For statement works @ LeafJS
Merge pull request #435 from tetsurom/jsfix

For statement works on LeafJS