Generation

generate functionThu, 15 Dec 2022

exponential calculator from input String

function getExponent(str) { const strArr = str.split("^"); const base = parseInt(strArr[0], 10); const exp = parseInt(strArr[1], 10); return Math.pow(base, exp); } getExponent("2^4")

Javascript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code