@christinaSmith/

to_the_power_js

JavaScript

No description

fork
loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.18053797422412976","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"Y29uc3QgYSA9IHByb21wdCgiV2hhdCBudW1iZXIgd291bGQgeW91IGxpa2UgdG8gdXNlPyIpCmNvbnN0IGIgPSBwcm9tcHQoIldoYXQgcG93ZXIgd2lsbCB3ZSBiZSBnaXZpbmcgeW91ciBudW1iZXI/IikKCmNvbnN0IHRvX3RoZV9wb3dlciA9IGZ1bmN0aW9uKGMsZCkgewogIHJldHVybiAoYyAqKiBkKQp9Cgpjb25zdCBhbnN3ZXIgPSB0b190aGVfcG93ZXIoYSxiKQoKY29uc29sZS5sb2coIGEgKyAiIHRvIHRoZSBwb3dlciBvZiAiICsgYiArICIgZXF1YWxzICIgKyBhbnN3ZXIp"},"asBuffer":null},"loaded":true}}
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