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.
Related Posts
The database environment has all of the following components except:
Related fields in a database are grouped to form a
A logical schema
The language used in application programs to request data from the DBMS is referred to as the
NULL is
In case of entity integrity, the primary key may be
In an E-R diagram attributes are represented by
Join The Discussion