Javascript_Introduction_quiz.md - brainchildservices/curriculum GitHub Wiki

  1. Why do JavaScript and Java have similar names?

    A. JavaScript is a stripped-down version of Java

    B. JavaScript's syntax is loosely based on Java's

    C. They both originated on the island of Java

    D. None of the above

    Ans: B

  2. _____ JavaScript statements embedded in an HTML page can respond to user events such as mouse clicks, form input, and page navigation.?

A. Client-side

B. Server-side

C. Local

D. Native

Ans: A

  1. Inside which HTML element do we put the JavaScript?

    A. SCRIPT

    B. BODY

    C. HEAD

    D. TITLE

  2. Is JavaScript a case-sensitive language?

    A. Yes

    B. No

  3. What is the correct JavaScript syntax to write "Hello World"?

    A. System.out.println("Hello World")

    B. println ("Hello World")

    C. document.write("Hello World")

    D. response.write("Hello World")

    Ans: C

  4. JavaScript is interpreted by _________?

    A. Client

    B. Server

    C. Object

    D. None of the above

    Ans: A

  5. Which of the following is the correct syntax to display “GeeksforGeeks” in an alert box using JavaScript?

    A. alertbox(“GeeksforGeeks”);

    B. msg(“GeeksforGeeks”);

    C. msgbox(“GeeksforGeeks”);

    D. alert(“GeeksforGeeks”);

    Ans: D

  6. JavaScript is interpreted by _________?

    A. Client

    B. Server

    C. Object

    D. None of the above

    Ans: A

  7. Which of the following best describes JavaScript?

    A. a low-level programming language.

    B. a scripting language precompiled in the browser.

    C. a compiled scripting language.

    D. an object-oriented scripting language.

    Ans: D

  8. JavaScript entities start with _______ and end with _________.?

    A. Semicolon, colon

    B. Semicolon, Ampersand

    C. Ampersand, colon

    D. Ampersand, semicolon

    Ans: D

  9. Which types of image maps can be used with JavaScript?

    A. Server-side image maps

    B. Client-side image maps

    C. Server-side image maps and Client-side image maps

    D. None of the above

    Ans: B

  10. When a user views a page containing a JavaScript program, which machine actually executes the script?

    A. The User's machine running a Web browser

    B. The Web server

    C. A central machine deep within Netscape's corporate offices

    D. None of the above

    Ans: A