Complete the code to get the length of the string.
const str = 'hello'; const length = str.[1];
In JavaScript, strings have a length property to get their size.
Complete the code to get the character at index 2.
const str = 'world'; const char = str.[1](2);
The charAt() method returns the character at a given index in a string.
Fix the error in the code to convert the string to uppercase.
const str = 'hello'; const upper = str.[1]();
The correct method name is toUpperCase() with a capital 'C'.
Fill both blanks to extract 'cat' from the string.
const str = 'concatenate'; const part = str.[1](3, [2]);
The substring(3, 6) extracts characters from index 3 up to but not including index 6: 'c' (3), 'a' (4), 't' (5) = 'cat'.
Fill all three blanks to create a new string with 'Hello World!' in uppercase.
const greeting = '[1]' + ' ' + '[2]' + '[3]'; const shout = greeting.toUpperCase();
Concatenate 'Hello', 'World', and '!' with spaces to form 'Hello World!'. Then convert to uppercase.
