JavaScript Program to Find the Square Root

bookmark


const number = prompt('Enter the number: ');

const result = Math.sqrt(number);
console.log(`The square root of ${number} is ${result}`);

 

 

Output:

Enter the number: 9 
The square root of 9 is 3