Quotes from Eric Freeman
By lexical scope we mean that JavaScript's rules for scoping are based purely on the structure of your code (not on some dynamic runtime properties). This means you can determine where a variable is defined by simply examining your code's structure. Also
~ Eric Freeman
BazillionQuotes.com
To write code this way, you need to consider the events that can happen, and how your code should react. Computer science types like to say that this kind of code is asynchronous, because we're writing code to be invoked later, if and when an event occurs. This
~ Eric Freeman
BazillionQuotes.com
No human being can tame the tongue. It is a restless evil, full of deadly poison. With it we bless our Lord and Father, and with it we curse people who are made in the likeness of God. From the same mouth come blessing and cursing. My brothers, these things ought not be so" (James 3: 8-10ESV).
~ Eric Freeman
BazillionQuotes.com
Now, when we have an environment that has a value for each of the free variables, we say that we've closed the function. And, when we take the function and the environment together, we say we have a closure.
~ Eric Freeman
BazillionQuotes.com
Q: Q: You said getElementsByTagName returns a list. Do you mean an array? A: A: It returns an object that you can treat like an array, but it's actually an object called a NodeList. A NodeList is a collection of Nodes, which is just a technical name for the element objects that you see in the DOM tree. You
~ Eric Freeman
BazillionQuotes.com
Joe: What's the target? Judy: Like I said, it's the element that generated the event. Like if you click on a specific image, the target will be that image.
~ Eric Freeman
BazillionQuotes.com
Take what varies and "encapsulate" it so it won't affect the rest of your code.
~ Eric Freeman
BazillionQuotes.com
JavaScript: Don't judge me by my bad parts, learn the good stuff and stick with that!
~ Eric Freeman
BazillionQuotes.com
When you design, solve things in the simplest way possible. Your goal should be simplicity, not 'How can I apply a pattern to this problem.
~ Eric Freeman
BazillionQuotes.com
A remote proxy acts as a local representative to a remote object.
~ Eric Freeman
BazillionQuotes.com
When you pass a primitive value it is copied into the parameter. We call this "passing by value." So if you change the value of the parameter in your function body it has no affect on our original argument's value. The exception to this is passing an array or object, and we'll get to that in a bit.
~ Eric Freeman
BazillionQuotes.com
A function without a return statement returns undefined.
~ Eric Freeman
BazillionQuotes.com
If a variable is declared outside a function, it's GLOBAL. If it's declared inside a function, it's LOCAL.
~ Eric Freeman
BazillionQuotes.com
when you assign a value to a variable name that hasn't been previously declared, it is treated as a new, global variable. So be careful, if you do this within a function you are creating a global variable. Note
~ Eric Freeman
BazillionQuotes.com
God had the ability to say whatever He desired, but He chose to speak life! Why? Because the words He spoke are the essence of who He is: Life!
~ Eric Freeman
BazillionQuotes.com
methods in objects are properties too. They just happen to have a function assigned to them.
~ Eric Freeman
BazillionQuotes.com
When you link to multiple JavaScript files from your page, all the global variables are defined in the same global space.
~ Eric Freeman
BazillionQuotes.com
If you assign a new variable without using the var keyword, that variable will be global, even if you are first assigning it in a function.
~ Eric Freeman
BazillionQuotes.com
an important thing to know about JavaScript: there's one queue and one "thread of control," meaning there is only one of me going through the events one at a time.
~ Eric Freeman
BazillionQuotes.com
Well, say you write a handler and it requires a lot of computation — that is, something that takes a long time to compute. As long as your handler is chugging along computing, I'm sitting around waiting until it's done. Only then can I continue with the queue.
~ Eric Freeman
BazillionQuotes.com
Booleans are named after George Boole, an English mathematician who invented Boolean logic. You'll
~ Eric Freeman
BazillionQuotes.com
We haven't done much writing code, but we are reading and understanding code, and that can be just as good. So
~ Eric Freeman
BazillionQuotes.com
Using a method to change a property is another example of encapsulation whereby we can often improve the maintainability and extensibility of code by letting an object worry about how it gets things done. It's
~ Eric Freeman
BazillionQuotes.com
In fact, there's a keyword in JavaScript named this, and that is exactly how you tell JavaScript you mean this object we're in.
~ Eric Freeman
BazillionQuotes.com
