JS-152-Objects-Arrays
  • Introduction
  • 04-Objects
    • OOP-Basics
      • Overview
      • Coding the Example
    • Prototypes
      • Object Prototypes
      • Prototypes Continued
    • Inheritance
      • Inheritance
    • Synopsis
      • Synopsis
    • Challenges
    • Solutions
      • Constructor Function
        • Person Constructor
        • Explanation
      • Inheritance Challenge
        • Code
        • Explanation
      • Family Challenge
        • Child
        • Pet
  • 05-Arrays
    • Array Basics
      • Array Overview
      • Creating an Array
      • Individual Elements and Length
      • Iterating Over Arrays
    • Array Methods
      • Methods Overview
      • .join() Method
      • .reverse() Method
      • .split() Method
      • .replace() Method
      • .splice() Method
      • .map() Method
      • .indexOf() Method
      • .filter() Method
      • .every() Method
    • Palindrome Algorithm
    • Array Challenges
    • Solutions
      • First and Last
        • First Element
        • Last Element
      • Most Frequent
      • Largest and Smallest
        • Single Array
        • Multiple Arrays
      • Missing Number
      • "Arrays" in the DOM
      • Sorting
        • Bubble Sort
        • Selection Sort
    • Resources
Powered by GitBook
On this page
  • 1 - Person Object
  • 2 - Inheritance Challenge
  • 3 - Family Challenge
  • Note
  1. 04-Objects

Challenges

Let's work on applying your knowledge of objects with some challenges.

1 - Person Object

Create a person object and give them various properties.

2 - Inheritance Challenge

Create a child object that inherits all of the properties and methods from your person object. Try adding things to the child object without changing the person object.

3 - Family Challenge

Using the skills you've acquired, create a family of person objects, children, maybe a few pets?

Note

There is no sample data or output provided with the challenges because you are meant to create the properties yourself. If you are truly struggling, check out the solution section.

PreviousSynopsisNextSolutions

Last updated 7 years ago