Exercise 156
- Create a new index156.js
- Copy and paste the code from exercise 155
- We need to refactor the code
- Add a method showDetail to each game object
- Calling the showDetail method will output the following message using the game properties values
name: %name%
price: %price%
sold: %sold%
console: %console%
- Update the games array iteration code and replace the previous console.log for a call to the showDetail method for each game object
- The objective is to use the showDetail to show the object properties values using an object method