I started my journey on learning JavaScript, there’s a lot to take in all at once, I really recommend heading over to freecodecamp, if you haven’t found it already, as they use a step by step exercises to build your knowledge, but make sure you fully understand it before moving on and don’t be afraid to go over the same lesson multiple times is it helps (I know it helped me immensely at times).
They also cover the html and CSS side of things which helps get ready for building web pages.
I thought I’d create a a few cheat sheets to refer to whilst learning, I’ll start with the basics:
Comparators
= |
to assign a value to a variable |
== |
is equal to |
=== |
is equal to AND type matches |
!== |
is NOT equal to |
< |
is LESS than |
<= |
is LESS than OR Equal to |
> |
is GREATER than |
>= |
is GREATER then OR Equal to |
&& |
AND |
|| |
OR |
Operators
operator |
use |
example |
equivalent to
|
++ |
increment by 1 |
x++ |
x = x + 1 |
−− |
decrement by 1 |
x−− |
x = x – 1 |
+= |
increase by |
x += 2 |
x = x + 2 |
-= |
derease by |
x -= 2 |
x = x – 2 |
*= |
mutiply by |
x *= 3 |
x = x * 3 |
/= |
divide by |
x /= 3 |
x = x / 3 |
Whitespace and Comments
\n |
new line |
\r |
carriage return |
\t |
next tab space |
// |
single line comment |
/* |
start of a multiline comment |
*/ |
end of a multiline comment |