Use the following data to solve the problems below. But first, let's look at this together!
var aquarium = {
filledWithWater: true,
capacityInGallons: 12,
numberOfRocks: 5,
fish: [
{
type: 'goldfish' ,
size: '3.5 inches',
color: 'golden'
},
{
type: 'puffer',
size: '4 inches',
color: 'tan'
},
{
type: 'clown',
size: '3 inches',
color: 'orange'
}
]
}
- access the value of the capacityInGallons key
- add 2 rocks to the numberOfRocks in the aquarium
- access the clown fish and print the object.
- access the size of the puffer fish.
- your goldfish grew! Access the 'size' key of goldfish and reassign it to '4 inches'.
- you bought a new fish! Make a new object for a 5 inch long, blue starfish and add it to the fish array.