0

Object's Property values

Is it possible to set all the properties' value inside an object to a certain number at once? for example, here is my object: var myObject = {Monday: 10, Wednesday: 25, Friday: 50}; what i want to happen is to set all the values of properties(Monday, Wednesday, Friday) within the object(myObject) to 0 when i click a button.

18th Dec 2019, 4:07 AM
Alfred
Alfred - avatar
2 Answers
18th Dec 2019, 6:11 AM
Sudarshan Rai
Sudarshan Rai - avatar