Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

variables in javascript

/*Variables declared with var, let and const are quite similar when declared outside a block.
They all have Global Scope:*/
var x = 2;       // Global scope
let x = 2;       // Global scope
const x = 2;       // Global scope
Source by fahadahmad.substack.com #
 
PREVIOUS NEXT
Tagged: #variables #javascript
ADD COMMENT
Topic
Name
1+7 =