Effective JavaScript Quotes

Rate this book
Clear rating
Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript (Effective Software Development Series) Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript by David Herman
783 ratings, 4.30 average rating, 61 reviews
Open Preview
Effective JavaScript Quotes Showing 1-10 of 10
“The properties of an object are automatically exposed, whereas the variables in a closure are automatically hidden.”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“Properties not found directly on u are looked up in u’s prototype. Accessing u.checkPassword, for example, retrieves a method stored in User.prototype.”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“Higher-order functions are nothing more than functions that take other functions as arguments or return functions as their result.”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“With the handy map method of arrays (introduced in ES5), we can completely eliminate the loop details, implementing just the element-by-element transformation with a local function: Click here to view code image var names = [" Fred", "Wilma", "Pebbles"]; var upper = names.map( function( name) { return name.toUpperCase(); });”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“Since methods are nothing more than functions called on a particular object, there is no reason why an ordinary function can’t refer to this:”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“The official difference between anonymous and named function expressions is that the latter binds its name as a local variable within the function. This can be used to write recursive function expressions:”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“var wrapped = wrapElements([ 10, 20, 30, 40, 50]); var f = wrapped[ 0]; f();”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“Functions that keep track of variables from their containing scopes are known as closures.”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“In JavaScript, most I/ O operations are provided through asynchronous, or nonblocking APIs. Instead of blocking a thread on a result, the programmer provides a callback (see Item 19) for the system to invoke once the input arrives:”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
“JavaScript’s global namespace is also exposed as a global object, which is accessible at the top of a program as the initial value of the this keyword. In web browsers, the global object is also bound to the global window variable. Adding or modifying global variables automatically updates the global object: this.foo; // undefined foo = "global foo"; this.foo; // "global foo”
David Herman, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript