Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Consider the following statements

    switch(expression)

    {

    statements

    }

    In the above switch syntax, the expression is compared with the case labels using which of the following operator(s) ?

  2. A.

     ==

    B.

     equals

    C.

     equal

    D.

     ===

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    When a switch executes, it computes the value of expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).


Be The First To Comment