Objects

Link to an example dynamic webpage that likely pulls data from a database to build the site – any social media site, newspaper, blog, etc. Take a screenshot of a typical “post” and propose an object data structure to store all the elements of the post. Use the Enlighter code embed tool to include your proposed object design in a code sample.

let redditPost= {
         user_pic:"rabbit.jpg"
         user_name:"r/mildlyinfuriating"
    info:{
         date: "9 hours ago"
         text: "Local store price gauging on hand sanitizer"
         image:"hand-sanitizer.jpg"
}
}

These are the exercises for this week:

movie-db-exercises.html/movie-db-exercises.js

object-examples.html/object-examples.js

These are the problem sets:

students.html/students.js

Join the Conversation

1 Comment

  1. Still moving along really well here. Couple of things to note:
    //you can shorten this test for falseness
    student.enrolled == false
    //can instead use the not operator '!'
    !student.enrolled

    And for the coursesTaken(studArr) function look at my comment to Ricardo’s post about it. You’re both logging the array of strings, instead of turning it into a single string.

Leave a comment

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

css.php