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

GITEX Dubai Talk by Saion Gupta and Saiasmi Gupta

Good morning, everyone. I'm Saion Gupta, the Founder of 10xCoderKids and the Guinness World Record holder for the youngest computer prog...