different ways to declare variables javascript code example
Example 1: how to define variable in javascript
var <variable-name>;
var <variable-name> = <value>;
Example 2: Create variable javascript
//Assigns the value bar to the variable foo
var foo = bar;