File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1- const num = 56.4567 ;
1+ const num = 56.5678 ;
22
33// You should look up Math functions for this exercise https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math
44
55// Create a variable called wholeNumberPart and assign to it an expression that evaluates to 56 ( the whole number part of num )
6- // Create a variable called decimalPart and assign to it an expression that evaluates to 0.4567 ( the decimal part of num )
6+ // Create a variable called decimalPart and assign to it an expression that evaluates to 0.5678 ( the decimal part of num )
77// Create a variable called roundedNum and assign to it an expression that evaluates to 57 ( num rounded to the nearest whole number )
88
99// Log your variables to the console to check your answers
You can’t perform that action at this time.
0 commit comments