1. Question: What will produce output for the following JavaScript code?
    total=10;
    for(i=1;i<5;i++){
       
       if(i%2)continue;  
       total+=i+2
       
    
    } 
    document.write(total)

    A
    20

    B
    28

    C
    23

    D
    none

    Note: Not available
    1. Report
  2. Question: What will produce output for the following JavaScript code?
    function greeting(a,n){
    
     for(i=0;i<n;i++){
      if(a=="m")return "morning "
      if(a=="e")return "evening "
     }
    }
    document.write(greeting("m",3));

    A
    morning

    B
    morning morning morning

    C
    morning morning

    D
    morning evening

    Note: Not available
    1. Report
  3. Question: To convert string lowercase to uppercase, JavaScript use:

    A
    toUpperCase(string)

    B
    string.toUpperCase()

    C
    string.strToUpper()

    D
    none

    Note: Not available
    1. Report
  4. Question: To redirect any webpage which of the following code fragment is used to accomplish this in javascript

    A
    window.location="http://yourdomain.com/yourpage";

    B
    window.location("http://yourdomain.com/yourpage")

    C
    widow.redirect("http://yourdomain.com/yourpage");

    D
    widow.redirect="http://yourdomain.com/yourpage";

    Note: Not available
    1. Report
  5. Question: Which of the following is not form event in JavaScript?

    A
    onSubmit

    B
    onkeyUp

    C
    onReset

    D
    onLoad

    Note: Not available
    1. Report
  6. Question: Which of the following code will make an infinite loop?

    A
    let i=10;
      do{
         
        i++
       }(i>10);

    B
    let i=10;
      do{
         
        i++
       }(i<19);

    C
    let i=10;
      do{
         
        i++
       }(i>11);

    D
    None

    Note: Not available
    1. Report
  7. Question: Which of the following is not programming structure?

    A
    Sequences

    B
    Branches/Conditions

    C
    Loops/Iteration

    D
    Input/Output

    Note: Not available
    1. Report
  8. Question: What does the break statement do?

    A
    Go to the next iteration from current iteration

    B
    Escape the loop entirely

    C
    Restart the loop again

    D
    None

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