Topics discussed this week:
• Async vs Sync
• Event Loop (order of execution)
• Promises
-
Read this article on scopes & closures: explaining-javascript-scope-and-closures
-
If you are still not completely clear on promises, here are some additional resources 💍
- Fix Requested Changes (if any) on the Pull Request.
Deadline Thursday
The homework for week 2 will build on the work you did in week 1. You will create a new branch based on the week1 branch.
-
Make sure that you committed all changes in the week 1 version of your homework.
-
Create a new
week2branch:git checkout -b week2
You will continue to work on the files index.js and (possibly) style.css.
- Complete your GitHub app code from the previous week, if needed, to meet the requirements from that week's assignment.
- Replace all asynchronous callbacks (e.g. as used with XMLHttpRequest) by ES6 promises.
- Beautify your app's styling.
- If not yet completed in week 1, make your app responsive (use CSS media queries and Flexbox).
- Have you removed all commented out code (should never be present in a PR)?
- Have you used
constandletand avoidedvar? - Do the variable, function and argument names you created follow the Naming Conventions?
- Is your code well-formatted (see Code Formatting)?
- Have you resolved all issues flagged by ESLint and the spell checker (no wavy red and green underlines in VSCode)?
If the answer is 'yes' to all preceding questions you are ready to follow these instructions:
-
Push your
week2branch to GitHub:git push -u origin week2 -
Create a pull request for your
week2branch.
Note:
- Please remove all redundant, commented-out code and console.log's from your files before pushing your homework as finished. There is no need for your mentors to review this stuff.
- Please make sure your code is well-formatted and follows the recommended naming conventions.
Go through the reading material in the README.md to prepare for your next class.