Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 8, 2019 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e94f42de08028aaba89a8be0540d74c7 to your computer and use it in GitHub Desktop.
Save parzibyte/e94f42de08028aaba89a8be0540d74c7 to your computer and use it in GitHub Desktop.
let negativoConDecimales = -501.55;
let negativoSinDecimales = Math.trunc(negativoConDecimales);
console.log(negativoSinDecimales); // Imprime -501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment