There are a few global JavaScript variables being set by code that runs in the shell that shouldn't be there. You can see them if you try to autocomplete an empty line in the shell by hitting tab at an empty prompt; one symbol may not even be a variable, but it shows up in the list if you generate it twice in a row. You can see the list of everything global (and not hidden) by hitting tab at an empty prompt in a fresh copy of the shell, then typing "_autocomplete_".
a0: "foo"
b0: "bar"
i: "return"
return: ??? not sure, but it's in the list
a0, b0 and i are just missing "var" to declare them local to the functions they are used in. I haven't dug into where "return" is coming from yet.