Skip to content

Instantly share code, notes, and snippets.

@ruichuang
Last active January 21, 2017 22:15
Show Gist options
  • Select an option

  • Save ruichuang/8c260a72b86e1c7e7713dcf28cfba26b to your computer and use it in GitHub Desktop.

Select an option

Save ruichuang/8c260a72b86e1c7e7713dcf28cfba26b to your computer and use it in GitHub Desktop.
The function object has a length property set to the number of formal parameters it is declared with.
In JavaScript, variables don't have types -- values have types.
The typeof operator always returns a string
Variables that have no value = "undefined", an "undeclared" variable is one that has not been formally declared in the accessible scope.
The typeof operator returns "undefined" even for "undeclared" (or "not defined") variables
let a = 13.6 | 0;[ floor float numbers]
All bitwise operations except unsigned right shift, >>>, work on signed 32-bit integers. So using bitwise operations will
convert a float to an integer. - slightly faster than Math.floor - 32-bit signed integers only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment