We’ll cover 4 kinds of literals – string literals, quantity literals, boolean literals and null literals.
String literals are usually surrounded by single fees (‘) or double fees (“).
'ABC' 'TechOnTheNet' "ABC" "TechOnTheNet"
var h = 'TechOnTheNet';
var h = "TechOnTheNet";
Number literals can be written with or except decimal places. Number literals can be either nice numbers or bad numbers. If you do now not specify a sign, then a fantastic quantity is assumed. Here are some examples of valid quantity literals:
15 3.14 -23
var counter = 15;
var found = false;
var h = null;