Types & Variables
// Strings
'this is my string';
'my second string';
"my name is max";
// Numbers
10;
500;
3.14;
// Booleans
true;
false;
// Specials
undefined;
null;
NaN;
// Objects
const user = {
name: 'Max',
username: 'maxoncode'
};
// Arrays
const users = ['max', 'susan', 'bree'];
const luckyNumbers = [1, 24, 56, 124];
const whatever = ['max', 1, 'bree'];
const superusers = [
{ name: 'max' },
{ name: 'susan' },
{ name: 'bree' }
];
console.log(superusers[2].name);
// Declare Variables
var thing = 'first';
const otherThing = 'second';
let newThing = 'third';
// Declare Variables and initialize later
let myVariable;
myVariable = 'something';