Created
April 29, 2016 20:54
-
-
Save easierbycode/bb18140ee4e1496d71111172ce70fd64 to your computer and use it in GitHub Desktop.
truncates the decimal part of a number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let num = 29.9; | |
console.log( Math.trunc( num ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment