October 24th, 2013, 10:24 AM
I had written code as below but cannot get number through prompt.
How to get number through prompt function in java script
var x=prompt("Enter number for square root","enter number");
x="Square root of " + x;
Thanks a lot in advance
October 24th, 2013, 11:56 AM
Didn't you see you have written text into X before getting sqrt of it? obviously this will fail...