Chapter 3: The Nature of JavaScript
- "And you can directly create objects, without creating an object factory (e.g., a class) first." I never thought about this until now.
- "It fails silently." Yikes!
- "it has no block-scoped variables." I thought
let
allowed you to declare a variable within the scope of a block? - What do you expect for a language that was written in 10 days? It's not perfect!
Chapter 15: Functions
- I like the explanation of the difference between parameters and arguments.
- Hoisting seems very odd to me, when would you call a function before it's declared?
- I really like this: "
apply()
is useful whenever a function accepts multiple arguments in an array-like manner, but not an array."
Chapter 16: Variables: Scopes, Environments, and Closures
- The "immediately invoked function expression" seems like a messy way to scope a variable.
- IIFE with parameters shorthand is not very readable.
- global variables are bad.
- I remember Steve talking about polyfills in a GDI class once. Interesting that they need to check for global variables.
Chapter 17: Objects and Inheritance
- Dot operator is pretty cool.
- Interesting that deleting properties of objects affects the optimization of performance.
'use strict'
is starting to seem like something you should always use to avoid the 'pitfalls' of javascript.- Unclear when you would want to do this:
jane.sayHelloTo.call(jane, 'Tarzan');
bind()
will make sure you don't lose connection with a scoped variable, but it will create a new function.- It's cool javascript will let you protect objects.
- The section on contructors would have been nice to read before doing the Leap javascript exercism.
Which sections were interesting?
- Chapters 3 and 15 were a nice overview.
Which sections did you totally skim?
- Environment section in chapter 16.
- Many, many parts of chapter 17.
Do you think the reading was valuable?
- Some of it for sure! Some of it I don't forsee the relevance yet.
Which topics were notably confusing?
- Environments and closures. The graphs made it worse.
- Prototypes, sort of.