variable declaration i javascript code example Example: Create variable javascript Click to copy//Assigns the value bar to the variable foo var foo = bar;