You need to put the correct number inside of the brackets so that thirdLetterOfLastName is assigned the third letter of lastName (which happens to be a v). You cannot use letters to index into a string in the way you are attempting.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Hi, accessing the characters of a string/array in any programming language with bracket notation uses index. The indexing starts with 0 and in this case,
var lastName = "Lovelace";
The indices of each character would be as follows:
Character: [ ‘L’, ‘o’, ‘v’, ‘e’, ‘l’, ‘a’, ‘c’, ‘e’ ]
Indices: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
When you normally count the third letter would always be at 2nd index. So your answer would be