Skip to content

Instantly share code, notes, and snippets.

@BritneyJo
Last active September 27, 2016 13:01
Show Gist options
  • Save BritneyJo/51472fa78f9e27482b57945b593e99f5 to your computer and use it in GitHub Desktop.
Save BritneyJo/51472fa78f9e27482b57945b593e99f5 to your computer and use it in GitHub Desktop.

Exercise

Create a variable named wdiStudent and assign it to an object literal.

  1. Give your student at least three properties.
  2. One must have a key that contains a hyphen.
  3. One must contain an array or object.
  4. Update two properties, one of which is the hyphenated.
  5. Give your student a new property using dot or bracket notation.
  6. Delete one attribute.
  7. Iterate through and print out all of the student's key-value pairs.

Bonus: Write a function that returns your wdiStudent object

Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment