diff options
Diffstat (limited to 'javascript/square-root')
-rw-r--r-- | javascript/square-root/square-root.js | 5 |
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; }; |