1. 5

The tilde is JavaScript operator that’s not used very often. If you don’t know what it is, come find out.

  1. 6

    Twos complement integers in JS are a bit of a sham. All numbers in JS are actually represented as floating points. I remember a while ago I had this fact bite me in the ass while trying to work with large integers. Here’s more info if anyone’s interested. http://2ality.com/2012/04/number-encoding.html

    1. 7

      Blame me for being blunt but it’s a bit stupid. The spec of the language has had that for ages: https://www.ecma-international.org/ecma-262/5.1/#sec-11.4.8 Maybe it’s just me, but I enjoy reading the spec of a language I’m learning, and if there’s no spec it’s usually a red flag.

      1. 3

        i remember when the original article was posted and seeing it and just laughing and feeling sorry for the author. Nice to see he has corrected himself.