Output:
16
Github link : https://github.com/adi501/JavaScriptExamples.git
Output:
16
Github link : https://github.com/adi501/JavaScriptExamples.git
Output:
this is a
multiline string
example
Github link : https://github.com/adi501/JavaScriptExamples.git
Output:
100
200
Github link : https://github.com/adi501/JavaScriptExamples.git
Output: 7
Github link : https://github.com/adi501/JavaScriptExamples.git
const : The const statement is used to declares a variable in JavaScript. Let introduced from ES2015.
JavaScript Code:
const myName='Adi';
console.log(myName);
myName='JC'; //error
console.log(myName);
let: The let statement is used to declares a variable in JavaScript. Let introduced from ES2015.
JavaScript Code:
let myName='Adi';
console.log(myName);
myName='JC';
console.log(myName);
Var: The var statement is used to declares a variable in JavaScript.
JavaScript Code:
var myName='Adi';
console.log(myName);
myName='JC';
console.log(myName);