adplus-dvertising
frame-decoration

Question

Consider the following code snippet:

[x,y]=[y,x];

What is the result of the above code snippet?

a.

Throws exception

b.

Swap the value of the two variables

c.

Flashes an error

d.

Creates a new reference object

Answer: (c).Flashes an error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the following code snippet: [x,y]=[y,x]; What is the result of the above code snippet?