Remove var statements from javascript for

Signed-off-by: Tim Smart <tim@fostle.com>