Created
December 6, 2018 11:41
-
-
Save maksimerohin/ff7cf09faeb6233b866732fc551de4cc to your computer and use it in GitHub Desktop.
Округляет число (до целого, десятка, сотни).
This file contains 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
function roundTo(num) { | |
return Math.round(num/10)*10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment