Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript variables

// here are the ways to define variables
var x = "hi"; // for global variables
let x = "hi"; // for block-scoped variables
const x = "hi"; // for block-scoped variables which can not be reassigned
Source by tylermcginnis.com #
 
PREVIOUS NEXT
Tagged: #javascript #variables
ADD COMMENT
Topic
Name
2+1 =