1. Question: How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?

    A
    if (i <> 5)

    B
    if (i != 5)

    C
    if =! 5 then

    D
    if <> 5

    E
    if (not = 5)

    Note: Not available
    1. Report
  2. Question: Which of the following is the correct syntex of "for" loop?

    A
    for (i = 0; i <= 5; i++;){

    }

    B
    for (i = 0; i <= 5; i++){

    }

    C
    for i = 1 to 5

    end for

    D
    for (i <= 5; i++){

    }

    Note: Not available
    1. Report
  3. Question: Which of the following is the correct syntax of FOR?

    A
    for ( increment; initialize; test)

    B
    for ( initialize; test), increment

    C
    for ( initialize; test; increment)

    D
    for ( test; initalize; increment)

    Note: Not available
    1. Report
  4. Question: In some case, which of the following could be replacement for "if"?

    A
    for

    B
    while

    C
    do-while

    D
    switch-case

    Note: Not available
    1. Report
  5. Question: Which of the following is true if A and B are not equal?

    A
    if A not = b

    B
    if A != B

    C
    if (A not = B)

    D
    if (A != B)

    Note: Not available
    1. Report
  6. Question: What is the correct output of the following code?
    for(i=0;i<4;i++){
    
     } 
    alert(++i);

    A
    3

    B
    4

    C
    5

    D
    6

    Note: Not available
    1. Report
  7. Question: What is the correct output for the following code?  
    var x=3; 
    var y=x>4?3:5; 
    alert(x+y);

    A
    no output

    B
    7

    C
    6

    D
    8

    Note: Not available
    1. Report
  8. Question: The following Javascript code fragments (A and B) is identical to each other? A
    a=2
    b=3
     a>b?alert("It is true"):alert("Not true");
    B
    a=2
    b=3
    if(a>b)alert("It is true")else alert("Not true")

    A
    Both code in A and B are correct syntax for the identical output

    B
    Code in A and B is not identical for output

    C
    Code A is correct syntax but Code B is incorrect syntax

    D
    Both is incorrect syntax

    Note: Not available
    1. Report
  9. Question: Which is the correct JavaScript syntax for "for/in" loop?

    A
    for(variable in object){ statement }

    B
    for(object in variable){ statement }

    C
    forin(object in variable){ statement }

    D
    forin(variable; test; increment){ statement }

    Note: Not available
    1. Report
  10. Question: What will product output for the following JavaScript code fragment
    var counter=50;
      while(counter>15){
         counter-=5;
      }
      document.write(counter);

    A
    15

    B
    10

    C
    0

    D
    no output

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd