From 054622c9994c0123faa94cb056f0ff166c64c391 Mon Sep 17 00:00:00 2001 From: Rak Laptudirm <68542775+raklaptudirm@users.noreply.github.com> Date: Thu, 13 May 2021 13:18:51 +0530 Subject: [PATCH] style(SquareRoot.js): Fixed style --- Maths/SquareRoot.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Maths/SquareRoot.js b/Maths/SquareRoot.js index 3c8f80b2a..be70502da 100644 --- a/Maths/SquareRoot.js +++ b/Maths/SquareRoot.js @@ -7,10 +7,8 @@ */ function sqrt (num, precision = 10) { - if (!Number.isFinite(num)) - throw new TypeError(`Expected a number, received ${typeof num}`) - if (!Number.isFinite(precision)) - throw new TypeError(`Expected a number, received ${typeof precision}`) + if (!Number.isFinite(num)) { throw new TypeError(`Expected a number, received ${typeof num}`) } + if (!Number.isFinite(precision)) { throw new TypeError(`Expected a number, received ${typeof precision}`) } let sqrt = 1 for (let i = 0; i < precision; i++) { sqrt -= (sqrt * sqrt - num) / (2 * sqrt)