free codecamp javascript
JavaScript provides seven different data types which are
undefined
, null
, boolean
, string
, symbol
, number
, and object
We tell JavaScript to create or declare a variable by putting the keyword var
in front of itvar ourName;
In JavaScript, you can store a value in a variable with the assignment operator.
myVariable = 5;
Assigns the
Number
value 5
to myVariable
.// Postfix
var x = 3;
y = x++; // y = 3, x = 4
// Prefix
var a = 2;
b = ++a; // a = 3, b = 3
// Postfix
var x = 3;
y = x--; // y = 3, x = 2
// Prefix
var a = 2;
b = --a; // a = 1, b = 1
.pop()
.shift()
No comments:
Post a Comment