I'm supposed to fix this so that the program works as intended; switching images when you click the button. However, I really can't tell what's wrong with it. Please help? Thanks in advance.
Aren't there supposed to be semicolons after the variable declarations?
https://www.w3schools.com/js/js_variables.asp
https://www.w3schools.com/js/js_arrays.asp
Read through these and you should be able to figure it out
>>272249
No, semicolons are only needed in JS if more than one statement is on the same line.
It's customary to put them in so as to not trigger "real" programmers, but they're not actually necessary.
>>272245
You're just setting a variable, you're not actually modifying the page. You need to get a handle to your img with something like getElementById, then overwrite its src field with the contents of your variable.
>>272251
Didn't read, huh?