From 00ca21200f8ab83e2614c7607e8617966f36ea50 Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 25 Aug 2021 20:12:07 +0530 Subject: JS: Remove Solution for square-root Cannot use built-in function. --- javascript/square-root/square-root.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }; -- cgit 1.4.1-2-gfad0