ga-wdi-exercises / pixart_js

Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]
MIT License
9 stars 321 forks source link

Pixel Art #68

Closed silviascript closed 9 years ago

silviascript commented 9 years ago

https://github.com/siltastic/pixart_js/tree/silvia-solution

Comfort Level: 2/5 --> 4/5 Completeness: 5/5

I am surprised that this works. I used "this" out of curiosity in my mouseover function and it worked the way I wanted it to. I'm still confused with "this", so I need to research more about it. Could you explain how it worked?

jshawl commented 9 years ago

:+1: try console.log(this) when you are unsure of the context. In this case, this represents the square you hover over.