Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Consider the following code snippet

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

    What is the result of the above code snippet?

  2. A.

     Throws exception

    B.

     Swap the value of the two variables

    C.

     Flashes an error

    D.

     Creates a new reference object

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The above code snippet swaps the value of the two variables.


Be The First To Comment