What is JavaScript?

  1. Which company is usually credited with inventing JavaScript (or at least getting the ball rolling with a language named LiveScript)?

    C. Netscape
  2. What is the name of the standards organization that defines and maintains the JavaScript language?

    B. ECMA International
  3. What are the three client-side languages that all Web browsers can execute?

    B. HTML, CSS, JavaScript
  4. Which is the shortest, simplest pair of tags you can use in HTML5 to mark the beginning and end of a block of JavaScript code?

    D. <script>...</script>
  5. Which characters can you use to start a single-line comment in JavaScript?

    D. //
  6. Which of the following best describes the reason we use JavaScript event handlers?

    B. To control when the JavaScript code is executed
  7. Which event handler would be best used to trigger JavaScript code when the mouse pointer touches an element?

    D. onmouseover
  8. Which of the following is the correct way to type the event handler that's triggered by clicking an element?

    C. onclick
  9. Which of the following shows properly nested quotation marks?

    B. onclick="alert('Hello')"
  10. Which feature of JavaScript allows you to organize code into routines that can be called by name from event handlers in tags?

    A. Functions
  11. Which DOM object includes properties for determining the height and width of the user's screen in pixels?

    B. screen
  12. What is the correct spelling of the document object method that allows you to reference an element on the page by its ID name (be sure to pay attention to case-sensitivity)?

    D. .getElementById()
  13. Which object and property return the width of the user's screen as a whole?

    D. screen.width
  14. Which object and method would you use to have JavaScript write tags or content directly into the page?

    A. document.write()
  15. Which of the following correctly creates a variable named fname and assigns the value Babs to that variable?

    B. var fname = "Babs"
  16. Which of the following stores a string in a variable named x?

    B. var x = "somewhere@somplace.com"
  17. Which of the following is a valid way to express a number in JavaScript?

    C. 9876.56
  18. Which of the following stores a Boolean value in a variable named isvalid?

    A. var isvalid="true"
    B. var isvalid = new Date()
    C. var isvalid=87
    D. var isvalid=false
    D. var isvalid=false
  19. Which of the following would be the correct way to multiply 2 by 5 (two times five) in JavaScript?

    B. 2 * 5
  20. Which of the following expressions asks the question Is price greater than or equal to 10?

    A. price >= 10
Card Set
What is JavaScript?
Lesson 1 - 4