what is a variable js code example

Example 1: js variable

var Number = 5;
var String = "Hi!";
var boolen1 = true;
var boolen2 = false;
var array = [11, "Hi!", true];
var object = {age:11, speach:"Hi!", likes_Bananas:true};

Example 2: 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 3: javascript variables

// Also let, const
var e_number = 0;
var e_string = '';
var e_true = true;
var e_false = false;
var e_undefined = undefined;

Example 4: varaible javascript

let <var-name> = value;