What I Changed
I deleted the for loop and made it so that alphabetList split every character in alphabet and added it to a list. Then I printed the list.
%%js
var alphabet = "abcdefghijklmnopqrstuvwxyz";
var alphabetList = alphabet.split("");
console.log(alphabetList);
let letterNumber = 5
console.log(alphabetList[letterNumber-1])
<IPython.core.display.Javascript object>
What I Changed
I deleted the for statement and made it so that it would take the letter number and input it into the alphabet list and print the letter. I subtracted one from the input because the first element in the list is 0 so you need to subtract one.
%%js
let odd = [];
let i = 1;
while (i < 10) {
odd.push(i);
i += 2;
}
console.log(odd);
What I Changed
I changed the starting number to one so when it prints every two it only prints odds and not evens. Then I just changed the variable name to odd to make it less confusing.