-
Consider the following code snippet
opt.fun(p,q);
Which is an equivalent code for the above code snippet?
-
- opt.fun(p && q);
- opt(fun)["p","q"];
- opt.fun(p) && opt.fun(q);
- opt["fun"](p,q);
- None of these
Correct Option: D
Another way to write opt.fun(p,q) is opt[“fun”](p,q).opt[“fun”] will access the property of the object and parenthesis will access the function present inside it.