button1 represents your first button element. These elements have a special property called onclick, which you can use to determine what happens when someone clicks that button.
You can access properties in JavaScript a couple of different ways. The first is with dot notation. Accessing the onclick property of a button would look like:
button.onclick
Use dot notation to set the onclick property of your button1 to the function reference of goStore. Note that button1 is already declared, so you don’t need to use let or const.
i did not actually understand, what does it want, cuz i was doing this long ago and then after 2-3 month im back and i forgot what is assigning and all that.
assigning is done with the = operator, so you need to put the function goStore to the right of the assignment operator, when you have on the left button1.onclick
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.