Learn JavaScript
Assessment Object
8.3
Assessment

Create Object - Add and Show property

Follow the steps given below to write a program:

Key Value
1 Car
2 Train
3 Bus
  1. Create an object vehicles that stores the properties given in the table above.

  2. Read all the values using bracket notation and show them using console.log().

  3. Then add the value Boat to key 4 using bracket notation.

  4. Finally show the vehicles object.