0 votes
in JavaScript by

Which one of the following code is equivalent to the following given code?

a) a.x(g,h);  

b) x (g) &&a.x (h);

c) a [ "x" ] ( g , h );

d) a (x )[ "g" , "h" ];

e) x( g&&h );

1 Answer

0 votes
by

Answer: B

Reason: We can use the alternate code to perform the same task of accessing the properties of the object <a.x(g,h) is a["x"](g,h).a["x"] > and the parenthesis will access the function "x" mentioned in it.

Related questions

0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
0 votes
asked Oct 9, 2022 in JavaScript by Robin
...