~/talk

"The Variable Crimes We Commit Against JavaScript"

Talkat NationJS 2017 · on Friday, 2017-12-01· [javascript]
github:julka
slides:none on file

Demonstrates how JavaScript scope and hoisting change real code: assigning magenta without var leaks to window while var creates function-scoped variables and makes rouge local; hoisting turns a later var terracotta into undefined at runtime; a marmalade closure keeps an internal counter that returns false false true across calls; objects and arrays copy by reference so bumblebee mutates canary, slice makes a shallow copy, and let/const create block scope so loop iterators don’t leak. Also covers arrow functions and const’s immutable reference behavior.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:26JavaScript scopes explained
  3. 4:01Var in function scopes
  4. 10:33Variable hoisting quirks
  5. 12:44Closures in JavaScript
  6. 14:13Arrays and objects references
  7. 17:50ES6 let const and block scope
  8. 22:31Named vs anonymous functions
  9. 27:32ES6 arrow functions
  10. 29:38Summary and resources
  11. 31:33Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.