1. Question: What will produce output for the following JavaScript code:
    <script>
    var x="10">3
    document.write(x);
    </script>

    A
    null

    B
    true

    C
    false

    D
    syntax error

    Note: Not available
    1. Report
  2. Question: What will produce for the following JavaScript code
    var alpha="apples";
     var beta="Apples";
     var output=alpha>beta;
     document.write(output);

    A
    true

    B
    false

    C
    null

    D
    0

    Note: Not available
    1. Report
  3. Question: What will produce output for the following JavaScript code
    var alpha=(15<20) && ("pen">"Sword");
     var beta=("big">"tall") && (20<30); 
     document.write(alpha+","+beta);

    A
    true,false

    B
    false,true

    C
    true,true

    D
    false,false

    Note: Not available
    1. Report
  4. Question: What will be the output for the following JavaScript bitwise operation?
    var alpha=5<<1;
    document.write(alpha);

    A
    10

    B
    6

    C
    2

    D
    4

    Note: 5<<1 =>101<<1 (converting 5 into binary) =>1010 (add 1 zero to the right) =>8+0+2+0 =>10
    1. Report
  5. Question: What will be output for the following JavaScript bitwise operation?
    a=1
    b=1
    c=0
    d=0
    
    document.write(a^b);
    document.write(",");
    document.write(a^c);
    document.write(",");
    document.write(c^d);

    A
    0,1,0

    B
    1,0,1

    C
    1,1,1

    D
    0,0,0

    Note: Not available
    1. Report
  6. Question: What will be output for the following JavaScript expression?
    var alpha=3*4+7
     var beta=3*(4+7)
     document.write(alpha+","+beta);

    A
    19,33

    B
    19,19

    C
    33,33

    D
    33,19

    Note: Arithmetic Operators Precedence Rank: 1. Multiplication 2. Division 3. Mod 4. Addition 5. Subtraction
    1. Report
  7. Question: What will produce for the following JavaScript code fragment?
    var BidA="33";
    var BidB="24"
    document.write(Math.max(BidA,BidB));

    A
    33

    B
    24

    C
    error

    D
    undefined

    Note: Math.max() method automatically convert string arguments into numbers first and then return largest one
    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