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 is a correct syntax to hide javaScript code from the older browsers that don't support the current version of javaScript?

    A
    <!-code//-->

    B
    //code

    C
    /*code*/

    D
    /code/

    Note: Not available
    1. Report
  7. Question: What language defines the behavior of a web page?

    A
    HTML

    B
    CSS

    C
    XML

    D
    JavaScript

    Note: Not available
    1. Report
  8. Question: How to append a value to an array of Java Script?

    A
    arr[arr.length] = value

    B
    arr[arr.length+1] = new Arrays()

    C
    arr[arr.length-1] = value

    D
    arr[arr.length*1] = value

    Note: Not available
    1. Report
  9. Question: How does Java Script store dates in objects of Date type?

    A
    The number of days since January 1st, 1900

    B
    The number of seconds since January 1st, 1970

    C
    The number of milliseconds since January 1st, 1970

    D
    The number of picoseconds since January 1st, 1970

    Note: Not available
    1. Report
  10. Question: Which attribute is used to hold the JavaScript version in the <script> element?

    A
    language

    B
    version

    C
    ver

    D
    lang

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