Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
var a=225;
document.writeln(Math.sqrt(a));

What will be the output of the following JavaScript code?
var a=225;
document.writeln(Math.sqrt(a));
a) 225
b) 15
c) error
d) undefined

Answer: b
Explanation: The JavaScript math sqrt() method returns the square root of a number. If the provided number is negative, it returns NaN.

Join The Discussion