Week 4- js condition exercise-Daisy Chen

Link:http://imanas.shanghai.nyu.edu/~qc532/week04/

For this weekly assignment, at first I want to write a counter that increases the number every time I click. And I tried clickcounter++ and clickcounter=clickcounter+1 to realize it but neither of them works. The console can’t read the counter number in the inspector and I still didn’t figure out why. Finally, I used a simpler way which is to change the counter number to indicate the change of walking state. But I’m still curious about the reason for the previous failure since I wrote similar things last semester in processing and it worked but this time it doesn’t work in js.

Leave a Reply