Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Math.pow (x, y)
- Math.pow(2,3) // 8
- 2 ** 3
- // 8
- // where first digit is base and second digit is exponent
- var square = 5 ** 2;
- console.log(square) // 25
- var cube = 5 ** 3;
- console.log(cube) // 125
Add Comment
Please, Sign In to add comment