how to use variable value to access javascript list code example Example: Create variable javascript //Assigns the value bar to the variable foo var foo = bar;