1. Question: Which of the following browsers support the sort() method for arrays? (Check all that apply.)

    A
    Netscape Navigator 2.0

    B
    Netscape Navigator 3.0

    C
    Netscape Navigator 4.0

    D
    Microsoft Internet Explorer 3.0

    E
    Microsoft Internet Explorer 4.0

    Note: Not available
    1. Report
  2. Question: Which element allows to write JavaScript?

    A
    <scripting>

    B
    <javascript>

    C
    <script>

    D
    <js>

    E
    <js language='javascript'>

    Note: Not available
    1. Report
  3. Question: What is the correct JavaScript syntax to write "Hello World"?

    A
    response.write("Hello World")

    B
    document.write("Hello World")

    C
    print("Hello World")

    D
    echo("Hello World")

    Note: Not available
    1. Report
  4. Question: How do you call a function named "myFunction"?

    A
    call function myFunction()

    B
    myFunction()

    C
    call myFunction()

    D
    none

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

    A
    if i==5 then

    B
    if i=5 then

    C
    if (i==5)

    D
    if i=5

    Note: Not available
    1. Report
  6. 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
  7. Question: How many different kind of loops are there in JavaScript?

    A
    Two. The "for" loop and the "while" loop

    B
    Three. The "for" and "for-in" loop, the "while" loop, and the "do-while" loop.

    C
    Four. The "for" loop, the "while" loop, the "do-while" loop, and the "loop-until" loop

    D
    One. The "for" loop

    Note: Not available
    1. Report
  8. 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
  9. Question: What is the correct way to write a one dimensional JavaScript array?

    A
    var txt = new Array(1:"tim",2:"shaq",3:"kobe")

    B
    var txt = new Array="tim","shaq","kobe"

    C
    var txt = new Array("tim","shaq","kobe")

    D
    var txt=["tim","shaq","kobe"]

    E
    var txt = new Array() txt[0]="tim" txt[1]="shaq" txt[2]="kobe"

    Note: None
    1. Report
  10. Question: How do you round the number 8.25, to the nearest whole number?

    A
    Math.rnd(8.25)

    B
    Math.round(8.25)

    C
    round(8.25)

    D
    rnd(8.25)

    E
    Math.round("8.25")

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