Skip to content

Commit c65dfcd

Browse files
authored
Update numbers
1 parent 2501aaa commit c65dfcd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

numbers

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,16 @@ console.log(parseFloat(example)); // get whole value of 7.77
1010
console.log(example, toFixed(5)); //7.77000 add 5 dec places
1111

1212
console.log(example, toFixed(1)); // round up to 7.8
13+
14+
15+
// [numbers challenge] //
16+
17+
let example1 = parseInt("33 World 22");
18+
let example2 = parseFloat('44 Dylan 33');
19+
let example3 = 55.3333.toFixed(0);
20+
let example4 = 200.0.toFixed(2);
21+
22+
console.log(example1); // output 33, if u have a number infront, it can detect it and pull it out
23+
console.log(example2); // same goes for this e.g.
24+
console.log(); // output 55
25+
console.log(); // output 200.00

0 commit comments

Comments
 (0)