vara js code example

Example 1: js variables

// JS Variables
var varExample = "var"; // var is use for variable in js the problem with it that it has complicated scope 
let letExample = "let"; // let is pretty much same as var the only thing which make its more varriable is its variable scope.
const constExample = "const"; // const is use for constant values and this variable scope is sane as let

Example 2: var javascript

var is a keyword to define the varible in js but as of es-6 we, use let and const keywords for the same

Example 3: var js

var num = 1:

Example 4: js var

var a = 0, b = 0;

Tags:

Html Example