What did we learn last time?
How to ask a question to the staff
- Try yourself
- Google it
- StackOverflow it
- Create a reproducible bug (e.g. jsfiddle)
- Ask on slack (#general)
Random Questions
- What is var and why we need it?
- What is a linter
- It's Javascript Object Oriented?
Functions
- How do you create a function?
- How do you also create a function?
- And how do you also also create a function?
Variable scope
- Closures
- The module pattern
Variable hoisting
- A variable can be referenced before it was defined
undefined vs null
- undefined a variable hasn't been created or assigned
- null a variable was created and assigned to null
Objects
- It's an object the same thing than a java HashTable?
- How do you create a new object?
- Can you add new attributes after object creation?
Arrays
- Create a function that sorts an array
- Create a function that filters an array of objects
- Create a function sums all the items on an array
Modify the DOM
document.getElementById("myId").innerHTML = "<p> hello! </p>"
Exercise
Update your webpage for the class' students loading directly from the Google sheet
Required Readings Next session
P1 Requirements
- Your homepage: Your skills, courses, projects, hobbies, etc.
- ✓ W3C Compliant
- ✓ Bootstrap 4+ (can use templates)
- ✓ At least two pages
- ✓ At least one JS (Vanilla) feature not copied
- ✓ Can use templates
P1 Submission Requirements
- Github page (README, MIT License, code)
- Deployed URL (consider github pages)
- Must remain online 6 months after the class ends
- 2 min presentation Google slides
- Code review (Github Pull Request)
Presentation
- Objective
- Technologies used
- What you are most proud of
- What was the hardest part
- Demo
- Use Google Slides
- Make sure they are public
Good README
- Good project name
- Project objective
- Screenshot
- Tech requirements
- How to install/use
- Author with link to homepage
- Reference to the class with link