We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 564425a commit b8b98a5Copy full SHA for b8b98a5
1 file changed
Maths/decimalIsolate.js
@@ -0,0 +1,15 @@
1
+/*
2
+ * function isolates the decimal part of a number.
3
+ * Take the number and subtract it from the floored number.
4
+ * Return the result.
5
+ */
6
+
7
+const decimalIsolate = (number) => {
8
+ return number - Math.floor(number)
9
10
+}
11
12
+// testing
13
+console.log(decimal_isolate(35.345))
14
+console.log(decimal_isolate(56.879))
15
+console.log(decimal_isolate(89.5643))
0 commit comments