Update index.js

This commit is contained in:
Samuel Lord 2024-01-27 16:28:02 -06:00 committed by GitHub
parent a80c3334a3
commit 97d5446425
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,16 +13,12 @@ function fisqrt(number) {
return y; return y;
} }
//manual sqrt //square
function msqrt(number) { function sq(n1, n2) {
for (var i = 0; i * i <= number; i++) { return n1 * n2;
if (i * i === number)
return i;
}
return number;
} }
//square //square self
function sq(number) { function sqs(number) {
return number * number; return number * number;
} }