Javascript
Attendance (Google Forms)
Secret word: ‘’Triangle”
Announcements
Project 1: making a personal website!
}
Why is JavaScript useful?
Intro to JS
JavaScript
Variables
Types
Numbers
Number Operations
Strings
Booleans
Control Flow
If Statements
if (statement) {
do something
} else if (statement2) {
do something
} else {
do something
}
While Loops
“Keep doing this while the rule allows it.”
For Loops
“I want to do this a certain number of times.”
Functions
Functions
You press a button → it follows a set of steps → you get coffee.
Built-Ins
Built-Ins
Data Types
Objects
Collection of Data
JSONs
What is a JSON?
Arrow Functions
Arrow Functions
Instead of saying “I am going to the store,” you say “g2g store.”
Arrays
Array Features
Spread operator
tinyurl.com/4b4mhvpx
updating 1 nested field (we need to spread each level)
Scope
Different Scopes in JS
Global scope
Local scope
Lexical scope
Block scope
Problems with var
var Keyword properties
Problems with these properties
Solution: let and const
Asynchronous Programming
What is asynchronous programming?
Why is it necessary?
Async Tools: Promises
Async Tools: Async/Await
Attendance (Google Forms)
Secret word: ‘’Triangle”