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 developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #variables #javascript
ADD COMMENT
Topic
Name
3+9 =