Skip to content

Commit

Permalink
part 1 done
Browse files Browse the repository at this point in the history
  • Loading branch information
MaterDev committed Oct 28, 2024
1 parent 03f73c7 commit 0f6d0f5
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Saguaro JS Foundations

13 changes: 13 additions & 0 deletions index.html
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>
51 changes: 51 additions & 0 deletions valuesAndExpress.js
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

0 comments on commit 0f6d0f5

Please sign in to comment.