Eloquent JavaScript Quotes

Rate this book
Clear rating
Eloquent JavaScript: A Modern Introduction to Programming Eloquent JavaScript: A Modern Introduction to Programming by Marijn Haverbeke
3,188 ratings, 4.14 average rating, 280 reviews
Eloquent JavaScript Quotes Showing 1-30 of 37
“Learning is hard work, but everything you learn is yours and will make subsequent learning easier.”
Marijn Haverbeke , Eloquent JavaScript: A Modern Introduction to Programming
“The programmer who refuses to keep exploring will surely stagnate, forget his joy, lose the will to program (and become a manager).”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“The art of programming is the skill of controlling complexity.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“You should imagine variables as tentacles, rather than boxes. They do not contain values; they grasp them—two variables can refer to the same value.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“How difficult it is to find a good name for a function is a good indication of how clear a concept it is that”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Higher-order functions allow us to abstract over actions, not just values.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Automated testing is the process of writing a program that tests another program. Writing tests is a bit more work than testing manually, but once you’ve done it, you gain a kind of superpower: it takes you only a few seconds to verify that your program still behaves properly in all the situations you wrote tests for.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Though computers are deterministic machines—they always react the same way if given the same input—it is possible to have them produce numbers that appear random. To do that, the machine keeps some hidden value, and whenever you ask for a new random number, it performs complicated computations on this hidden value to create a new value.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“The main thing I want to show in this chapter is that there is no magic involved in building your own language. I’ve often felt that some human inventions were so immensely clever and complicated that I’d never be able to understand them. But with a little reading and tinkering, such things often turn out to be quite mundane.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction
“Below the surface of the machine, the program moves. Without effort, it expands and contracts. In great harmony, electrons scatter and regroup. The forms on the monitor are but ripples on the water. The essence stays invisibly below. —Master Yuan-Ma, The Book of Programming”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“The best way to learn the value of good interface design is to use lots of interfaces — some good, some bad. Experience will teach you what works and what doesn’t. Never assume that a painful interface is “just the way it is.” Fix it, or wrap it in”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“You’re building your own maze, in a way, and you might just get lost in it.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“In the happy land of elegant code and pretty rainbows, there lives a spoil-sport monster called inefficiency.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs. — Joseph Weizenbaum, Computer Power and Human Reason”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Because computers are dumb, pedantic beasts, programming is fundamentally tedious and frustrating.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“The for (;;) construct is a way to intentionally create a loop that doesn’t terminate on its own.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“So there is another feature that try statements have. They may be followed by a finally block either instead of or in addition to a catch block. A finally block says “no matter what happens, run this code after trying to run the code in the try block.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“There are several JavaScript dialects that add types to the language and check them. The most popular one is called TypeScript. If you are interested in adding more rigor to your programs, I recommend you give it a try.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Strict mode does a few more things. It disallows giving a function multiple parameters with the same name and removes certain problematic language features entirely (such as the with statement, which is so wrong it is not further discussed in this book).”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“JavaScript can be made a little stricter by enabling strict mode. This is done by putting the string "use strict" at the top of a file or a function body.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Normally, when you forget to put let in front of your binding, as with counter in the example, JavaScript quietly creates a global binding and uses that. In strict mode, an error is reported instead.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“A prototype is another object that is used as a fallback source of properties. When an object gets a request for a property that it does not have, its prototype will be searched for the property, then the prototype’s prototype, and so on. So who is the prototype of that empty object? It is the great ancestral prototype, the entity behind almost all objects, Object.prototype.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Such a prototype object will itself have a prototype, often Object .prototype, so that it still indirectly provides methods like toString.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“As we’ve seen, Math is a grab bag of number-related utility functions, such as Math.max (maximum), Math.min (minimum), and Math.sqrt (square root).”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“You can use a similar three-dot notation to call a function with an array of arguments. let numbers = [5, 1, 7]; console.log( max(... numbers)); // → 7 This “spreads” out the array into the function call, passing its elements as separate arguments. It is possible to include an array like that along with other arguments, as in max( 9, ... numbers, 2).”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“It can be useful for a function to accept any number of arguments. For example, Math.max computes the maximum of all the arguments it is given. To write such a function, you put three dots before the function’s last parameter, like this: function max(... numbers)”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“Values of type string, number, and Boolean are not objects, and though the language doesn’t complain if you try to set new properties on them, it doesn’t actually store those properties. As mentioned earlier, such values are immutable and cannot be changed. But these types do have built-in properties. Every string value has a number of methods.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“we will see a way in which a function body can get at the whole list of arguments it was passed (see “Rest Parameters” on page 74). This is helpful because it makes it possible for a function to accept any number of arguments.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“If you write an = operator after a parameter, followed by an expression, the value of that expression will replace the argument when it is not given.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming
“We defined square with only one parameter. Yet when we call it with three, the language doesn’t complain. It ignores the extra arguments and computes the square of the first one.”
Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming

« previous 1