πŸ“Š JavaScript
Q. Which of the following is the correct output for the following JavaScript code:
Code:
    functiondisplayArray(x)  
    {  
    varlen=x.length,i=0;  
    if(len==0)  
    console.log("Empty Array");  
    else  
    {  
    do  
    {  
                 console.log(x[i]);  
    } while (++i<len);  
    }  
    }  
  • (A) Prints the numbers in the array in specific order
  • (B) Prints the numbers in the array in the reverse order
  • (C) Prints "Empty Array"
  • (D) Prints 0 to the length of the array
πŸ’¬ Discuss
βœ… Correct Answer: (A) Prints the numbers in the array in specific order

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
267
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Indresh Gehalot
Publisher
πŸ“ˆ
98%
Success Rate