ArsenPapiyan,
function myPow(x, n) {
var result = 1;
if (n == 0) {
return 1;
}
else if (n < 0) {
for (var i = 0; i > n; i--) {
result /= x;
}
return result;
}
else {
for (var i = 0; i < n; i++) {
result *= x;
}
return result;
}
}
console.log(myPow(2482,(1/4)) == Math.pow(2482,(1/4)));