“An object named arguments is available in every function when that function is called. You” — Eric Freeman Copy Share Image
“In fact, there’s a keyword in JavaScript named this, and that is exactly how you tell JavaScript you mean this object we’re… — Eric Freeman Copy Share Image
“That’s because the default prototype for any instance you create (assuming you don’t change it) is Object.” — Eric Freeman Copy Share Image
“Remember what happens when you call getElementById and the id doesn’t exist in the DOM? You get null. Same thing with getAttribute.… — Eric Freeman Copy Share Image
“As it turns out, one of the things the new operator does behind the scenes when the object is created is to… — Eric Freeman Copy Share Image
“The NoCommand object is an example of a null object. A null object is useful when you don’t have a meaningful object… — Eric Freeman Copy Share Image
“A string is always a primitive unless you create it in a special way using an object constructor. We’ll talk about object… — Eric Freeman Copy Share Image
“Note that the JSON format doesn’t work with methods (so you can’t include, say, a bark method in your JSON string), but… — Eric Freeman Copy Share Image
“JavaScript doesn’t have a classical object-oriented model, where you create objects from classes. In fact, JavaScript doesn’t have classes at all. In… — Eric Freeman Copy Share Image
“A callback works like this: give a function to the object that knows about the event. When the event occurs, that object… — Eric Freeman Copy Share Image
“Well, say you write a handler and it requires a lot of computation — that is, something that takes a long time… — Eric Freeman Copy Share Image
“When you pass zero to setTimeout, you’re asking JavaScript to run your timeout handler as soon as it possibly can — and… — Eric Freeman Copy Share Image
“One thing that often misleads people learning closures is that they think the environment in the closure must have a copy of… — Eric Freeman Copy Share Image
“By lexical scope we mean that JavaScript’s rules for scoping are based purely on the structure of your code (not on some… — Eric Freeman Copy Share Image
“When you call an object’s method, this is set to the object whose method was called. If the method is not found… — Eric Freeman Copy Share Image
“Using a method to change a property is another example of encapsulation whereby we can often improve the maintainability and extensibility of… — Eric Freeman Copy Share Image
“Now, when we have an environment that has a value for each of the free variables, we say that we’ve closed the… — Eric Freeman Copy Share Image
“when you assign a value to a variable name that hasn’t been previously declared, it is treated as a new, global variable.… — Eric Freeman Copy Share Image
“JavaScript: When an event occurs, like the ones you’ve mentioned, that event is added to a queue. I don’t even look at it… — Eric Freeman Copy Share Image
“The hasOwnProperty method returns true if a property is defined in an object instance. If it’s not, but you can access that… — Eric Freeman Copy Share Image
“When you delete a property, you’re not just deleting the value of the property, you’re deleting the property itself. And, if you try to… — Eric Freeman Copy Share
“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… — Eric Freeman Copy Share
“Web Workers have a global function named importScripts that you can use to import one or more JavaScript files into your worker. To” — Eric Freeman Copy Share
“If the two values have different types, try to convert them into the same type and then compare them” — Eric Freeman Copy Share
“Well, it’s a browser policy, and it says you can’t retrieve data from a domain that is different from the domain the page itself… — Eric Freeman Copy Share
“Math is not a constructor, or even a function. It’s an object. As you know, Math is a built-in object that you can use… — Eric Freeman Copy Share
“When you pass zero to setTimeout, you’re asking JavaScript to run your timeout handler as soon as it possibly can — and this leads… — Eric Freeman Copy Share
“JavaScript doesn’t have a character type. So characters are returned as new strings containing one character.” — Eric Freeman Copy Share
“Lexical scope means that we can determine the scope of a variable by reading our code.” — Eric Freeman Copy Share
“Q: Q: You said getElementsByTagName returns a list. Do you mean an array? A: A: It returns an object that you can treat like… — Eric Freeman Copy Share
“the truth is JavaScript actually makes two passes over your page: in the first pass it reads all the function definitions, and in the… — Eric Freeman Copy Share
“If you change any property in the prototype, it affects all the objects that inherit from that prototype, unless that object has overridden that… — Eric Freeman Copy Share
“methods in objects are properties too. They just happen to have a function assigned to them.” — Eric Freeman Copy Share