We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 793ce32 commit f873938Copy full SHA for f873938
1 file changed
javascript/3_math-programs/floatToWhole.js
@@ -0,0 +1,8 @@
1
+// 15. Convert a Float Number to Whole Number
2
+
3
+function toWholeNumber(n) {
4
+ // return Math.floor(n);
5
+ return parseInt(n)
6
+}
7
8
+console.log(toWholeNumber(10.5))
0 commit comments