summary refs log tree commit diff stats
path: root/javascript
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-08-25 20:12:07 +0530
committerAndinus <andinus@nand.sh>2021-08-25 20:12:07 +0530
commit00ca21200f8ab83e2614c7607e8617966f36ea50 (patch)
treedd6be27ad4d6140be2db5dbb96da0e599d34c952 /javascript
parent3fb698bbe091cbaa8d5d3f2256ebfb776523448d (diff)
downloadexercism-00ca21200f8ab83e2614c7607e8617966f36ea50.tar.gz
JS: Remove Solution for square-root
Cannot use built-in function.
Diffstat (limited to 'javascript')
-rw-r--r--javascript/square-root/square-root.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/javascript/square-root/square-root.js b/javascript/square-root/square-root.js
index 50c3634..8f1c1a6 100644
--- a/javascript/square-root/square-root.js
+++ b/javascript/square-root/square-root.js
@@ -1,3 +1,6 @@
 export const squareRoot = (num) => {
-    return Math.sqrt(num);
+    // The idea is not to use the built-in javascript functions such
+    // as Math.sqrt(x), x ** 0.5 or x ** (1/2), it's to build your
+    // own.
+    return num;
 };