Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rounding(number, round) {
- if (round > 15){
- round = 15;
- }
- console.log(Number(number.toFixed(round)));
- }
- Тарикатско решение:
- function rounding(number, round) {
- console.log(Number(number.toFixed(round > 15 ? 15: round)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement