Re:Tutorial: Create a Mobile HTML5 Farming Game with LimeJS
by WesleyJohnson on Wednesday October 17, 2012 @02:36PM
(#4665844)
Any specific examples you'd like to site? I always enjoy learning new things by seeing how people might re-factor or rewrite existing code samples.
[ Parent
| on HN ]
Re:Tutorial: Create a Mobile HTML5 Farming Game with LimeJS
by kevincennis on Wednesday October 17, 2012 @04:10PM
(#4666191)
The block that starts with the comment `//shop items`:
`var label` gets declared 3 times inside each loop iteration. Even if JS had block scope, which it doesn't, that would be pretty bad.