http://imanas.shanghai.nyu.edu/~yz4970/week4/index.html
I encounter a lot problems when doing this exercise. First is adjusting the positions of the pictures. I forgot the “flex” function in css. Then I had difficulty in assigning numbers to a variable. After changing the order of the code, I succeeded in assigning right numbers to the variable each time we click the button. Then, I figured out that everything in Javascript only happens once. And everything else will rely on events. Every time an event is called, code inside that event will happen.