JavaScript pow() method implementation

Took 1 minute and 13 seconds to code JavaScript pow() method. Here is the code snippet.

Code:

function pow(num1, num2) {
num3 = num1 ** num2;
return num3;
}

document.write(pow(8, 2));

Result:

64

No comments:

Post a Comment

Coding for Kids

What is coding? In coding we build a program to do a specific task for us. Code: A code is a set of computer instructions and when you will ...