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 arr = [7, 5, 9, 1];
var min = Math.min.apply(null, arr);
document.writeln(min);

What will be the output of the following JavaScript code?
var arr = [7, 5, 9, 1];
var min = Math.min.apply(null, arr);
document.writeln(min);
a) 7
b) 5
c) 1
d) 9

Answer: c
Explanation: The function apply() is used to call a function that contains “this” value and the argument contains elements of an array. Unlike call() method, it contains a single array of arguments.

Join The Discussion