This is geared toward beginners and anyone looking to refresh their knowledge.
Level 2 will cover Uninitialized Variables, Case Sensitive Variables, Adding Numbers, Subtracting Numbers, Multiplying Numbers, and Order of Operations.
When a variable is not set to a value, it is defaulted as "undefined". Uninitialized means a variable was declared (i.e. with var, let, or const) and was NOT assigned (=) to a value.
Case Sensitive Variables
In multi-word variables use lower case for the first word, and capitalize the first letter of any subsequent words. This is called camelCase.
Adding Two Numbers
Adding numbers is just as easy as using a (+) between numbers. The results below will show as a comment (// )assigned (number).
The same applies with subtraction, but instead, you use (-) between numbers.
Multiplying Two Numbers
When multiplying numbers we use the (*) operator.
Order of Operations
In order of first to last:
- Multiplication and Division (from left to right)
- Addition and Subtraction (from left to right)