Vidyalelo
JavaScript · Q19

Array And Function

Programming · JavaScript · question 19

Q19

Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?

A.
o(x,y);
B.
o.m(x) && o.m(y);
C.
m(x,y);
D.
o.m(x,y);
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
The code above is an invocation expression: it includes a function expression o.m and two argument expressions, x and y.