reading-notes

My reading notes journal for Code Fellows

View the Project on GitHub

Read: 07 - Programming with JavaScript

Functions

A function is just a block of code this code is made to perform a task.

A function is performed then when calls it too.

Here is an example of how this works:

 function myFunction(p1, p2) {
 return p1 * p2;   // The function returns the product of p1 and p2
 }

Operators

There are a variety of operators with in JavaScript.

Here are a few:

 Arithmetic Operators
 Assignment Operators
 Comparison Operators
 Logical Operators
 Conditional Operators
 Type Operators

Here are examples of operators:

 let x = 5;         // assign the value 5 to x
 let y = 2;         // assign the value 2 to y
 let z = x + y;     // assign the value 7 to z (5 + 2)

I’ve only touched the surface on topic of operators but there is much more to learn soon.