Skip to content

Instantly share code, notes, and snippets.

@lushijie
Last active June 2, 2016 01:47
Show Gist options
  • Save lushijie/ca051af4dc8777ec613c5725e1c85c82 to your computer and use it in GitHub Desktop.
Save lushijie/ca051af4dc8777ec613c5725e1c85c82 to your computer and use it in GitHub Desktop.
位运算取下整
Math.floor(4.9) === 4 //true
~~4.9 === 4 //true
(4.9 | 0) === 4 //true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment