I'm new to JavaScript and this is a basic question but I simply can't find the answer. I've created a couple variables.
var foo1 = true;
var bar = 1;
Is there any way I can re-create my boolean variable including the value of "bar"? I'm trying to create "foo1 = false;" here:
foo+bar = false; // or
foo[+bar] = false;
None of this works of course.