JS Basics – Objects


  • Section 12, videos 114 – 120
  • Tutorial Notes
  • Exercise files to publish on your server, HTML/JS pairs
    • obj-samples.js
    • obj-quiz.js
    • movieDB.js
    • methods-sample.js
    • keyword-this.js

Problem Set

  • Problem set to publish on your server, HTML/JS pair with the following functions
      • ctCourseCount(studArr)
      • ctCourseCountforEach(studArr)
      • isNotEnrolled(studArr)
      • coursesTaken(studArr)

Blog Questions

Use the code insert tool and provide examples to answer these two questions. Use JS comment syntax to describe your example.

  • Give an example of a webpage that uses an array of objects? Provide a link. Describe a possible data structure for the object which is used over and over again. Screenshot the example and write a data structure for it using the insert code. Here’s an example:
  • var hackerNewsPosts = [
            post_title: "FaunaDB 2.5.4",
            post_link: "https://jepsen.io/analyses/faunadb-2.5.4",
            posts_from_site_title: "jepsen.io",
            posts_from_site: [], //array of other posts from this site
            post_points: 93,
            post_author: "aphyr1",
            time_posted: value, //value based on created time function
            post_comments: [] //array of comments with this post


Leave a comment

Your email address will not be published. Required fields are marked *