declare array, js logic
Merge pull request #2 from jonbloom/master

declare array, js logic