Home » JavaScript » JavaScript Functions » Question
  1. Consider the following code snippet
    function output(n) 
    {
    for(var v in n)
    console.log(v + ": " + n[v] + "\n");
    }

    What will the above code snippet result ?
    1. prints only one property
    2. Prints the contents of each property of n
    3. prints the address of elements
    4. Returns undefined
    5. None of these
Correct Option: D

The above code snippet returns undefined.



Your comments will be displayed only after manual approval.