diff --git a/calc.html b/calc.html index 67146e5..8ac1577 100644 --- a/calc.html +++ b/calc.html @@ -49,6 +49,7 @@ +
diff --git a/calc.js b/calc.js index a3a3df6..e741c4b 100644 --- a/calc.js +++ b/calc.js @@ -108,8 +108,6 @@ function equal() { } input[0].value = `${value}`; -console.log(value); - // value=value.toString(); } @@ -192,6 +190,15 @@ function zero() { let value = input[0].value; input[0].value = `${value}0`; } + +/****FIND POWER OF ANY NUMBER****/ +function power() { + let click = document.getElementById("power"); + btnClick(click); + let input = document.getElementsByClassName("input"); + let value = input[0].value; + input[0].value = `${value}**`; +} function e() { let input = document.getElementsByClassName("input"); let value = input[0].value;