JavaScript (Short)
JavaScript (Short)
Unlike python, JavaScript runs client side, on your own machine when u
visit a website
TO
VARIABLES
- Similar to python variables
- No type specifier
- When a local variable is delcared it should be prefixed with var
Conditionals
if
else if
Else
Switch
?:
if
else if
Else
Switch
?:
Loops -
While
Do-while
For
Functions -
Introduced with the function keyword
Arrays -
Objects -
However the properties, year and model cannot stand on their own without
However the properties, year and model cannot stand on their own without
the car structure.
Methods are like functions that are inherent to the object, and mean nothing
outside it.
- Methods cannot stand on their own
- Only existing i
- n the context of the object
LOOPS -
Events -
Events -