Home / MCQ Bank / Computer
Computer Basic And Variables

Which is a more efficient code snippet ? Code 1 : for(var num = 10 ;num >= 1 ;num -- ) { document . writeln ( num ) ; } Code 2 : var num = 10 ; while( num >= 1 ) { document . writeln ( num ) ; num ++ ; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • Code 1

Related Computer Questions

What is the purpose of Hadoop's Key Management Server (KMS) in encryption? What will be the output of the following C code? #include <stdio.h> int main() { printf("%d ", 1); goto l1; printf("%d ", 2); } void foo() { l1: printf("3 ", 3); } Which of the following is a monitoring solution for hadoop? Which of these data members of HttpResponse class is used to store the response from a http server? In Access press DOWN ARROW or CTRL+ DOWN ARROW