S Stasenndb New member Sep 19, 2021 #1 What will be the equivalent code of the following JavaScript code? Code: o.m(x,y); A. o.m(x) && o.m; B. o[“m”](x,y); C. o(m)[“x”,”y”]; D. o.m(x && y);
What will be the equivalent code of the following JavaScript code? Code: o.m(x,y); A. o.m(x) && o.m; B. o[“m”](x,y); C. o(m)[“x”,”y”]; D. o.m(x && y);
Đ Đỗ Chí Hải New member Sep 19, 2021 #2 Answer: b Explanation: Another way to write o.m(x,y) is o[“m”](x,y).o[“m”] will access the property of the object and parenthesis will access the function present inside it. Upvote 0 Downvote
Answer: b Explanation: Another way to write o.m(x,y) is o[“m”](x,y).o[“m”] will access the property of the object and parenthesis will access the function present inside it.