Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf3fd09

Browse files
authored
Update numberRounding.js
1 parent 3479de7 commit bf3fd09

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Week1/numberRounding.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ console.log(z);
44
let a = Math.round(z);
55
console.log(a);
66
let numbers = [a, z];
7-
numbers.sort(function(a, b) { return b - a; });
7+
let highNumber=(Math.max(z,a));
8+
console.log(highNumber);
9+
810

11+
/* ----this is what i found first---
12+
numbers.sort(function(a, b) { return b - a; });
913
var highest = numbers[0];
10-
console.log(highest);
14+
console.log(highest);
15+
*/

0 commit comments

Comments
 (0)