main.js
1
2
3
4
5
6
7
8
9
10
const a = prompt("What number would you like to use?")
const b = prompt("What power will we be giving your number?")

const to_the_power = function(c,d) {
  return (c ** d)
}

const answer = to_the_power(a,b)

console.log( a + " to the power of " + b + " equals " + answer)
Native Browser JavaScript