Sorry if this was asked before but I am unsure why this code is not working? Is if and else not possible using charat?
let str = new String ('Hello');
if (str.charAt(0) == 'H')
//console.log('H')
console.log(str.charAt(0))
else if (str.charAt(1) == 'e')
console.log(str.charAt(1))
Thank you,