What will be the output of the following JavaScript code? [code] [x,y]=[y,x]; [/code]

Đạt Michio

New member
What will be the output of the following JavaScript code?
Code:
[x,y]=[y,x];
A. Throws exception
B. Swap the value of the two variables
C. Flashes an error
D. Creates a new reference object
 

Tìm kiếm

Back
Top