JavaScript Review
JavaScript and programming, in general, are all about information, manipulating information, and displaying information. All this information can be anything from numbers to text to combinations of both.
- Numbers
- Strings
- Objects
Are all common types of information in JavaScript.
Variables
This is where we typically store information. And we store it in variables.
We create with the let keyword.
let age = 27;
Now age stores number value 27.
Functions
This is a huge part of JavaScript. We write some code once, and we reuse it in multiple places, saving us a lot of time and difficulty. It gives various ways to create the function, including the regular way and the arrow functions.
let result = add(2, 4);
This will result in a number value of 6.
Arrow function do the same thing as regular function way. But this is the much shorter way and is great for items like callbacks.