how to declare a var in code example

Example 1: variable javascript

//You can make a variable by using:
var variable-name = 'defenition of the variable';
// Or you can use
let variable-name = 'defenition of the variable';

Example 2: how to declare variables javascript

//variables are a way to easily store data in javascript
//variables are declared by the var keyword, example...
var x = 10;
//or
var dog_name = "daisy";
//which can also be written as 
var dog_name = 'daisy';
//same thing with single quotes and double quotes