This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Functions// | |
| /* Functions are like instructions that can be stored | |
| * to use over and over again. They can be named, annonymous | |
| * or assigned to a varible or constant. */ | |
| /* There are two phases of using functions. | |
| * 1. Declaring the function-- creating it | |
| * 2. calling or invocation of the function to use it */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Loops// | |
| /* Loops are built-in features of JavaScript that allow | |
| * us to execute a block of code as many times as needed */ | |
| //for Loops// | |
| //There are 3 parts to a for loop.// | |
| //startng point // | |
| // ending point // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Control flow or Conditional statements// | |
| //Remember truthy and falsey 0, NaN, null, false, undefined, and empty strings// | |
| //are false and will make your conditional statement false// | |
| //if, else if, else Statements// | |
| /* If and else statements work together to evaluate a logical expression | |
| * and run different statements based on the result. if statements | |
| * can be used alone but an else statement must be used with an if. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //String Manipulation// | |
| /* String manipulation are the various ways to conveting strings*/ | |
| var hello = "Hello World!" | |
| //Types of string manipulation functions// | |
| //charAt() finds the character at a specified position (0 indexed)// | |
| console.log(hello.charAt(2)); //consoles l// | |
| //concat() combines one or more strings and returns the combined string// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Operators// | |
| /* Assignment Operators assign the value of the operand to the | |
| * right of the operand on the left = */ | |
| var a = 1; | |
| // Arithmetic Operators// | |
| /* Arithmetic operators perform mathmatical operations on | |
| * operands and return a result*/ | |
| console.log(2 + 2); // + addition// | |
| console.log(2 - 2); // - subtraction// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Datatypes (Simple & Complex): | |
| *Datatypes are classified as either simple or complex. Simple datatypes | |
| *include numbers, string, Boolean, NaN, undefined, and null. They are | |
| *immutable they don't hold a value, They return simple values and don't | |
| *change the original value. They only take up a limited amount of space. They are | |
| * stored by value. | |
| *Complex datatypes consist of arrays, objects, and funtions. | |
| *They aggregate other values. They hold an indefinite space od memory. They are | |
| *copied by value. | |
| * Number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Variables: | |
| * | |
| *Variables are continers used to hold values. Thes values can be any | |
| *data type. Variables can be changed once they are defined. | |
| * | |
| * To create a variable we use the keyword var followed by the name . | |
| */ | |
| var firstName; | |
| console.log(firstName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="Variables, Const, Let"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <title>Variables, Let, and Const</title> |