Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Workshop Outline
Welcome and Setup
- Intro and Welcome
- Who are you?
- About me and the workshop
- Quick poll
- Setup
- Update
js4shiny
- What and why is JavaScript?
Intro to JavaScript
(10:30–12:00)
- JavaScript Basics (10:30–10:50)
- Browser dev tools (2)
- Assigning variables (2)
- Code comments (0)
- Data types (4)
- Operators (6)
- 💻
repl_example("are-we-there-yet")
- Coercion
- 💻 Operators with mixed types
- Comparison
- 🖼 strict Comparison
- 🖼 truthy/falsy
- 🙋 strict vs. loose comparison table
- Incrementing
- 🖼
x++ and ++x
- 💻 trace incrementing
- Objects (10:50–11:05)
- Arrays
- Objects
- Destructuring, rest, spread
- Exercise
- 💻 TODO: arrays & objects
- 💻
repl_example("spread-node-element")
- Control Structures (11:05–11:25)
- If Else
- 🖼 ternary if/else
- For Loops
- 🙋
string.length
- 🖼 for loop varieties
- 💻
repl_example("for-loop-sum-array")
- 💻
repl_example("for-loop-sum-series")
- 💻
repl_example("for-loop-object-ref")
- References vs Values
- 🖼 pass by reference vs value
- Functions
- 🖼 function styles
- function arguments
- 🖼 rest params
- 🖼 destructuring params
- 🖼 default values
- 💻
repl_example("limits-of-array-{1,2}")
- Math built-in
- how to search MDN
- 💻
repl_example("limits-of-array-{1,2}")
- Deeper into JavaScript (11:25–12:00)
- Scope
- Block scope
- Function scope
- Closures
- Exercise
- 🙋 what value where?
- 💻
repl_example("one-time-only")
- Callback functions
- some, every, filter
- demo on strings with
.startsWith(),
.includes(), .endsWith()
- Array methods
.forEach(), .map(),
.reduce()
- scrabble examples
repl_example("scrabble")
- 💻
repl_example("scrabble-forEach-word")
- 💻
repl_example("scrabble-map-word")
- 💻
repl_example("scrabble-reduce-rearrange")
- 💻
repl_example("scrabble-reduce-total")
HTML & CSS (12:30–2:00)
- HTML Basics (12:30–12:50)
- Structure of a web page
- HTML tags are nested
- HTML is a tree
- Block vs inline elements
- div vs span
- common html elements
- structural elements
- text elements
- inline
<a>
<img>
- Better than div/span
repl_example("pkg-calendar-part-1")
- 🙋 View source
- CSS Basics (12:50–1:25)
- Where to put CSS
- Selector Basics
- CSS variables
- Properties for appearance
- CSS units and inheritance
- Selector specificity
- Intermediate CSS (1:25–1:50)
- Box model
- Position
- Attributes
- Media Rules
- Interesting CSS (1:35–2:00)
- Bootstrap
Interactive Web (2:30–4:00)
- Animations
- Transitions
repl_example("animation-by-transition")
- Interactive Web
- Rebuild animation by transition from scratch
- Finding elements
getElementById
querySelector(), querySelectorAll()
- Manipulate class list
.classList, .classNames
.toggle()
.add(), .remove()
- update style directly
- Events
repl_example("events")
- Modify Document
textContent, innerHTML
document.createElement(),
appendChild()