Symbol datatype in JavaScript

Symbols are new primitive type added in ECMAScript 2015. Symbols do not have a literal syntax, they have a Symbol() function that can be used to create them.

Symbols are unique. Each new symbol has a new, unique value.
Symbol() === Symbol() // false

Uses:
1. Symbols may be used as unique property keys. They prevent name clashes.
2. They may be used as constants representing concepts.
const CATEGORY_PHONES = Symbol('phones');

Difference between null and undefined in JavaScript

null and undefined are similar and both mean an absence of value. They are considered equal by the equality operator (==).
console.log(null == undefined); // true

To distinguish them the strict equality operator (===) should be used.
console.log(null === undefined); // false

The main difference between them is that undefined represents an unexpected absence of value and the value of a variable should not be set to undefined. null, however, represents normal, expected absence of value and if there is no value, the value of the variable can be set to null.

What is the Difference between var and let in JavaScript?

var keyword
Variables declared with the var keyword can not have Block Scope.
Variables declared inside a block {} can be accessed from outside the block.
Variables can be referred to before the declaration.

Example1:

  var x = 2; 
}
// x CAN be used here

Example2:
document.write( x );//undefined
var x = 9;
document.write( x );//9

let keyword
Variables declared with the let keyword can have Block Scope.
Variables declared inside a block {} cannot be accessed from outside the block.
Variables cannot be referred to before the declaration.
Example1:

  let x = 2;
}
// x can NOT be used here

Example2:
document.write( x );//throw an error
let x = 9;
document.write( x );//9