Variables

Basic

// let creates a block scoped variable that can be re-assigned
let intager = 9;
let float = 9.9;

let string = 'this is a string';

let boolean = true;

let value = null;

// creates undefined variable
let value;

// var creates a function global variable that can be re-assigned
var value = '';

// const creates a none re-assignable variable
const value = 78;

String

// concatenation
string = 'hello' + ' again';
string += ' and again';

// interpolation / template literal
string = 'Yes ' + text + ' come with you';
string = 'Yes ${text} come with you';