+ 2
//return a value to get back result... but there you are finding squire, not squireroot
//to get squireroot, you have predefined function use as return Math.sqrt(n);
n = prompt("Square root of:")
function sqr() {
let sqrt = n*n;
return sqrt;
}
document.write(sqr())
+ 1
Just add return