In JavaScript, why does ~~Infinity evaluate to 0?

Viewed 255

Can anybody explain:

  • why double bitwise NOT for Infinity returns 0?

    ~~Infinity //return 0
    
  • what happens under the hood?

  • what is the binary representation of Infinity in javascript?

1 Answers
Related