Y
Hacker News
new
|
ask
|
show
|
jobs
by
have_faith
3882 days ago
It makes no difference but for some reason I feel the urge to shorten the last line to:
lightsOn = !lightsOn;
I'll see myself out.
2 comments
Cshelton
3882 days ago
Every time I write that in JavaScript, I delete it and just use ! As well haha
link
polishninja
3882 days ago
Don't forget to turn off the light on your way out.
lightsOn = !lightsOn || lightsOn
link