Exercise 1: Let's Shop
In this exercise, you will be required to define properties in an object.
We'll cover the following
Problem Statement
In this exercise, you are required to create an object for shopping products named product
. This object should have the following properties:
-
name
: astring
denoting the name of the product. -
price
: aninteger
denoting the price of the product. -
amount
: aninteger
denoting the amount of that product bought. -
madeIn
: astring
denoting the country that made the product.
For the purpose of this exercise, you can set these properties equal to whatever values you like.
Example
Sample values are given below:
-
name
: Cheese -
price
: 20 -
amount
: 10 -
madeIn
: USA
Get hands-on with 1400+ tech skills courses.