Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (42 sloc) 2.28 KB

Flashcard questions

Arrays

  • What does splice() do?
    • What method would you use interpolate new elements into an array by position?
  • What does split() do?
    • What method would you use to convert a string into an array?
  • What does toString() do?
    • What method would you use to convert an array to a string?
  • What does concat() do to arrays?
    • What method would you use to merge two or more arrays?
  • What would the method max() tell you about an array?
    • What method would you use to find the highest value in a numerical array?
  • What would the method min() tell you about an array?
    • What method would you use to find the lowest value in a numerical array?
  • What does the length() method tell you about an array?
    • How would you work out how many individual elements there are in an array?
    • What method tells you how many elements are in an array?
  • What does the property .length tell you about an array?
    • Which property tells you an array's length?
  • Explain the following statement var array = []. When would you use it?

Objects

  • What does Object.keys tell you about an object?
    • How would you find out all the keys that are associated with an object?

JSON

  • What does the method JSON.stringify do?
    • How would you convert an object literal into JSON object notation?
  • What does JSON.parse do?
    • How would you convert JSON into a JS object literal?

Document object model

  • What does the property document.anchors return?
    • How would you find out the anchor text of every link within a web page?
  • What would the property document.baseURI tell you about a webpage?
    • How would you find out the canonical URL of a webpage?
  • What DOM property can you target to select the entirety of the page body?
  • What DOM property can you use to identify the cookies operative on a webpage?
    • What would document.cookie tell you?
  • What DOM property can you target to select the entirety of the page <head>?
  • What does the property document.images return?
    • How would you access all of the images on a webpage?
  • What property of the DOM can you use to find out when a web page was last changed?
    • What does the property document.lastModified tell you?
  • What does the property document.referer tell you?
You can’t perform that action at this time.