Hello. I have a score sheet that holds scores for a game of Yahtzee. When a “new game” button is clicked, I need all of the scores reset to null. The score sheet is composed of three objects in an array. I was trying to construct a function to reset everything to null using the for…in statement but it doesn’t seem to work. Any ideas? Code below…
Recall that you cannot use dot notation when referencing object properties using a variable.
2 Likes
Thank you so much! Works perfectly now.
Glad I could help. Happy coding!