In that project, I did a simple calculator can do Sqrt, Any power of number, And factorial stuff.
// Factorial
const number = result.innerHTML;
let a = 1;
for(let i = 1; i<=number; i++) {
a = (a*i);
}
result.innerHTML = `${a}`;
// Pofn
let a = prompt('What power of the number do you want to get?');
let num = Number(a);
let b = Math.pow(result.innerHTML, num);
result.innerHTML = `${b}`;
// Sqrt
const problem = result.innerHTML;
let a = Math.pow(problem, 2);
result.innerHTML = `${a}`;