CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

String Length and Indexing

JavaScript code walkthrough · Question 19
easyStrings

Code

Read carefully. What does this print?
1let word = "hello";
2console.log(word.length);
3console.log(word.charAt(0));
4console.log(word[word.length - 1]);

Your answer