Exercise 2: Let's iterate!
In this exercise, you will be required to iterate through the properties of an object.
We'll cover the following
Problem Statement
You need to iterate through the object and change the value of:
name
to BottlemadeIn
to China
You need to do the above-mentioned task in the set
function given below. We are using that function for testing purposes only, so no need to worry. Just write the implementation code there.
Note: For more practice, try solving this question using both dot notation and square brackets to access properties of the object.
Get hands-on with 1400+ tech skills courses.