-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# Saguaro JS Foundations | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<script src="./valuesAndExpress.js"></script> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<h1>Look at the terminal (👀)</h1> | ||
|
||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
let myBirthday | ||
|
||
console.log("My birthday: ", myBirthday) | ||
|
||
myBirthday = '4-26-1986' | ||
|
||
console.log("My birthday: ", myBirthday) | ||
|
||
/** | ||
* Declare variable | ||
* var - dont use (Global) | ||
* let - can reassign a variable a different value | ||
* const - cannot reassign a different value | ||
* */ | ||
|
||
/** | ||
* ! Different Data Types: | ||
* Primative | ||
* - Undefined | ||
* - Null | ||
* - Booleans - true/false, 1/0, any variable that has a value that is not zero/false | ||
* - Number | ||
* - Strings | ||
* Reference Types | ||
* - Functions | ||
* - Object | ||
*/ | ||
|
||
let myObject = { | ||
key: "value", | ||
pet: "dog" | ||
} | ||
|
||
let myArray = [1,2,3,4] | ||
|
||
console.log(typeof true) | ||
console.log(typeof "dog") | ||
console.log(typeof myArray) | ||
console.log(typeof myObject) | ||
console.log(typeof 3.14) | ||
|
||
// * Type coercion | ||
|
||
console.log(5 - '10') | ||
console.log(5 * '10') | ||
console.log(5 + '10') | ||
console.log(5 - "dog") | ||
console.log(5/0) | ||
|
||
// * PEMDAS (Order of Operations) | ||
// Code grouped in paretheses will run as a group |