JS

JavaScript Code Output Challenge - String prototyp...

6.

What is the output of the following code?

const sentence = "I love JavaScript";
const words = sentence.split(" ");
console.log(words);

["I love", "JavaScript"]

["I love JavaScript"]

["I", "love", "JavaScript,"]

["I", "love", "JavaScript"]