0 votes
in JavaScript by
What's its value?
console.log('❤️' === '❤️');
  • A: true
  • B: false

1 Answer

0 votes
by

Answer: A

Under the hood, emojis are unicodes. The unicodes for the heart emoji is "U+2764 U+FE0F". These are always the same for the same emojis, so we're comparing two equal strings to each other, which returns true.

Related questions

0 votes
asked Mar 9 in JavaScript by DavidAnderson
0 votes
asked Mar 12 in JavaScript by DavidAnderson
...