Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js variables

// Can be a number
var myVar = 21
//Can be a string
var myVar2 = "string"
// Used in a function
function printVar(parvar) {
  print(parvar);
}

printVar(myVar2);
// prints "string"
printVar(myVar);
// prints 21
Source by fahadahmad.substack.com #
 
PREVIOUS NEXT
Tagged: #js #variables
ADD COMMENT
Topic
Name
3+7 =