Zachary Cronin
Dev Cronin

Dev Cronin

Level Up with JavaScript - Level 2

Level Up with JavaScript - Level 2

Zachary Cronin's photo
Zachary Cronin
·Aug 15, 2021·

2 min read

Level up with JavaScript - Level 2

In this blog series tutorial, you will be introduced to some of the basic JavaScript programming concepts.

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.

Uninitialized Variables

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 JavaScript case-sensitivity matters. "LEVEL" is not the same as "level". The best practice is to use all lower case in single word 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).


Subtracting Numbers

The same applies with subtraction, but instead, you use (-) between numbers.


Multiplying Two Numbers

When multiplying numbers we use the (*) operator.


Order of Operations

JavaScript follows the order of operations. This is the order in which a math problem is solved.

In order of first to last:

  1. Parentheses
  2. Exponents
  3. Multiplication and Division (from left to right)
  4. Addition and Subtraction (from left to right)

Thank you for reading my blog! This is the second of my series on JavaScript so if you would like to read more, please follow!


Support and Buy me a Coffee

Share this