Home / CSE MCQs / Javascript MCQs :: Discussion

Discussion :: Javascript MCQs

  1. Consider the following code snippet

    console.log(p)

    If p is not defined, what would be the result or type of error?
  2. A.
    Zero
    B.
    Null
    C.
    ReferenceError
    D.
    ValueNotFoundError

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    In the above code snippet, p is not defined. Hence, it gives a ReferenceError.


Be The First To Comment