Use charCodeAt(0) and omit the ‘&#’ in your string:
if ( X.charCodeAt(0) == 9660 ) {
$('body').append('Yay!');
}
0
solved Comparing whether a unicode equals something [closed]
Use charCodeAt(0) and omit the ‘&#’ in your string:
if ( X.charCodeAt(0) == 9660 ) {
$('body').append('Yay!');
}
0
solved Comparing whether a unicode equals something [closed]