chore(js): Don't declare the same `var` more than once since they're hoisted