In week one we will discuss the following topics:
• Capturing user input
• Basic DOM manipulations[img src, innerHTML]
• Code debugging using the browser
• Events
• Code commenting
• Structuring code files
• Code formatting
• Handing in homework via PR
To save time, please do these preparations at home before coming to the first lecture.
-
Install the following extensions in VSCode (you may have installed some of them already):
- Code Spell Checker
- ESLint
- Prettier - Code formatter
- open in browser
- Live Server
- Bracket Pair Colorizer
-
Install the ESLint tool globally by issuing the following command from the command line:
npm install -g eslint -
Fork this repository (i.e., JavaScript2) and clone your fork to your laptop.
-
Open the
JavaScript2folder from the cloned repository in VSCode. -
Open a terminal window in VSCode and type the following command:
npm install
As a refresher, go through the topics of JavaScript1:
- Variables (var, let, const)
- Basic Data types (Strings, Numbers, Arrays, Booleans)
- Operators
- Naming conventions
- Advanced data types (objects)
- Conditional execution
- Statements vs Expressions
- Loops (for/while)
- Functions
- Scope
(No reading material available at this time for the crossed-out topics)
Capturing user input- Events
- Basic DOM manipulations (img src, innerHTML)
- Code Degugging Using the Browser
- Code commenting
Structuring code- Code formatting
- Handing in homework via PR
Extras:
These chapters from Eloquent JavaScript give in-depth explanations of the topics that will be discussed during the lecture. Highly recommended (if time permits).
-
Chapter 13: JavaScript and the Browser
-
Chapter 14: The Document Object Model
You can skip the following sections:
- Moving through the tree
-
Chapter 15: Handling Events
Notes: for the lectures and homework you only need to know about these events:
click,change,keyupandload.You can skip the following sections (but come to these sections when doing the React module):
- Touch events
- Scroll events
- Focus events
- Events and the Event Loop
- Debouncing
Please go through the material and come to class prepared!