What is JavaScript?

  1. In the JavaScript code setTimeout("alert('Boo!')", 5000),; what does the 5000 represent?




    D. Five seconds of time
  2. What's the correct syntax for calling a function named changesize() repeatedly every two seconds?




    D. setInterval("changesize()", 2000)
  3. What is the definition of the term millisecond?




    C. A thousandth of a second
  4. What would be the correct syntax for stopping a timer named myTimer?




    C. clearInterval(myTimer)
  5. Which of the following best describes the purpose of the JavaScript .className property?




    D. Adds a CSS style class to an external style sheet
    A. Gets or sets the CSS style class that's assigned to an element
  6. Which of the following shows the correct syntax for linking to a JavaScript code file named jsCode.js that's in the same folder as the page that contains this code?




    C. <script src="jsCode.js".</script>
  7. Which of the following could you use to delay JavaScript code execution until after all the HTML and CSS code has been rendered?




    A. DOMContentLoaded
  8. Which of the following can find all the elements of a certain type in a page?




    C. getElementsByTagName
  9. Which of the following would split a URL up into separated items where a slash (/) is used to separate the items?




    C. .split("/")
  10. Which of the following get the last item from an array?




    B. .pop()
  11. In addition to downloading the jQuery library to your computer and linking to that file within your site, what's another way to use jQuery in your site?




    B. Link to jQuery on a Content Development Network (CDN)
  12. What character is used throughout JavaScript code to call code in the jQuery library?




    D. $
  13. What does $(document).ready do in jQuery? 




    D. Ensures that the page is loaded and ready to go before any jQuery code is executed
  14. Which of the following best describes a minified file?




    A. A file with all the comments and extra spaces removed so it is small and downloads quickly
  15. Which best describes the action required to fire jQuery code that has the selector and event hander $("img").click?




    D. The user clicks any image on the page
  16. What does the jQuery toggleClass() method do?




    A. Switch between different CSS classes for styling an element
  17. What is the correct syntax for making an element slide into and out of view quickly?




    B. .slideToggle("fast")
  18. What's the meaning of the jQuery selector $('.wookie p')?




    B. All paragraphs inside an element whose opening tag includes class="wookie"
  19. If you create a CSS style class to display one background image and then create a second CSS style class to display a different background image, which jQuery method would allow you to switch between the two different background images?




    B. .toggleClass()
  20. Which of the following best describes jQuery decision-making?





    B. jQuery uses the same syntax as JavaScript for if...then decisions
Author
jdavis123
ID
355734
Card Set
What is JavaScript?
Description
Lesson 9-12
Updated