JavaScript: The Definitive Guide

JavaScript: The Definitive Guide

  • Downloads:7277
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-10-18 09:56:36
  • Update Date:2025-09-06
  • Status:finish
  • Author:David Flanagan
  • ISBN:0596805527
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

Since 1996, JavaScript: The Definitive Guide has been the bible for JavaScript programmers—a programmer's guide and comprehensive reference to the core language and to the client-side JavaScript APIs defined by web browsers。 The 6th edition covers HTML5 and ECMAScript 5, with new chapters on jQuery and server side JavaScript。 It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers who want to master it。

Download

Reviews

Emilio Clemente

As a new comer to JavaScript, I was afraid of the language and had a bad impression of if, but this book made me feel more confortable and eager to do more with the language and keep learning it。

Dex

If you are a beginner, this book is NOT for you。 It is very very hard to understand and comprehend at first glance。 Even simple topics come across as complicated in this mess of a book。 I completed reading around 300 pages and Im not keen on reading the rest of the content in this book。 And hence this review。 Im already a React。js developer and picked up this book since its so highly rated to spend time reading advanced concepts of JS。 I do NOT want a beginner(especially) spending time reading t If you are a beginner, this book is NOT for you。 It is very very hard to understand and comprehend at first glance。 Even simple topics come across as complicated in this mess of a book。 I completed reading around 300 pages and Im not keen on reading the rest of the content in this book。 And hence this review。 Im already a React。js developer and picked up this book since its so highly rated to spend time reading advanced concepts of JS。 I do NOT want a beginner(especially) spending time reading this book without knowing what he/she is in for。 The author's sentence formation is confusing to understand and to try and learn JavaScript, you need to get used to the Author's English first。 Due to this additional and mundane layer of complexity, I'd suggest you look at other titles/online resources rather than reading this book, which to me at this point comes across as a book written by a man with some deep personal issues or even communication gaps。 I find it hard to believe O'Reilly Media let this particular Author write the content。 Save yourselves and avoid this title at all costs。 。。。more

Jefferson

This book gave me a deeper and broader understanding of the language。 Highly recommend for devs with some pior knowledge of the language。

Joonas

This is the best JS book out there。 Highly recommended。

Aayush Shrivastva

Cover all three aspects of Mordern ECMAScript

Niklas Vatn

My appreciation for JavaScript grew with each chapter read。

Ryan Frantz

Very definitive。

Barnaby Thieme

Of the JavaScript books I've looked at, this is the one I would recommend to any and all people getting started with the language。 On the plus side, it is comprehensive, systematic, clear, and generally well-written。 I am amazed how often even classic books on programming languages are stuffed with basic errors, such as presupposing information they have not yet explained, not commenting code samples, or introducing multiple concepts at the same time。 This volume is free of such errors。 On the n Of the JavaScript books I've looked at, this is the one I would recommend to any and all people getting started with the language。 On the plus side, it is comprehensive, systematic, clear, and generally well-written。 I am amazed how often even classic books on programming languages are stuffed with basic errors, such as presupposing information they have not yet explained, not commenting code samples, or introducing multiple concepts at the same time。 This volume is free of such errors。 On the negative side, it is systematic and consistent to a fault, always working methodically from basic concepts up to higher-level ideas。 This is a good fit with its comprehensive scope, but it comes at a significant cost。 Pedagogically speaking, the best way to introduce a new idea is usually to give practical examples and to walk through them。 In some chapters, it takes many pages to get to the first concrete illustration of any practical code - in particular, I think of the crucial and very long chapter on client programming。 I found that the author's uniform adherence to a systematic exposition often made ideas more difficult to assimilate, and I sometimes had to put the book down and go to other tutorials for an introduction to ideas that immediately answered my key questions。 In my view, all technical documentation whatsoever should begin by answering the questions "What is it?" and "What does it do?" Despite its liabilities, which make it in some ways more useful as a reference than a practical introduction, as I said I would recommend this book to literally any programmer getting started with JavaScript。 Its virtues are considerable, and I have no doubt I will return to it again and again。 。。。more

BJ

This is one of the best modern JavaScript language references/guides I've encountered。 If it's not definitive, it's likely closer than any other book out there。 I wouldn't recommend it to a beginning coder--that's not really what this is for。 If you have some coding experience, it is a perfect companion to any guided tutorial or structured class focusing on JavaScript。 I expect I will refer back to it as I continue to immerse myself in future JavaScript coding projects。 This is one of the best modern JavaScript language references/guides I've encountered。 If it's not definitive, it's likely closer than any other book out there。 I wouldn't recommend it to a beginning coder--that's not really what this is for。 If you have some coding experience, it is a perfect companion to any guided tutorial or structured class focusing on JavaScript。 I expect I will refer back to it as I continue to immerse myself in future JavaScript coding projects。 。。。more

Stefan

great book, but got irrelevant so quickly - time to read 7th edition

Cezary Piątek

This is one of the most comprehensive books about JavaScript。 I learned a lot from reading it many years ago。

Taras Chornyi

It was very hard to read about technologies that were used before I was born,but as honorable engineer I read it totally and I don’t get bold。

Justin

Probably should have been two books。 The section on JavaScript is worthwhile but the tour of web development and node felt tiresome and incomplete。 I started tuning out around the last three chapters。 Still a great read though。

Tech Nomad

Very good comprehensive and systematic overview of the JavaScript (ES5) language。 I didn't read the book from the beginning to the end。 I did this with Jon Duckett's JavaScript book。 But every time I missed something there I could find an answer in this book。 The language used by the author is quite dry but for my needs it was perfect。 I'm excited about the upcoming 2020 edition。 Very good comprehensive and systematic overview of the JavaScript (ES5) language。 I didn't read the book from the beginning to the end。 I did this with Jon Duckett's JavaScript book。 But every time I missed something there I could find an answer in this book。 The language used by the author is quite dry but for my needs it was perfect。 I'm excited about the upcoming 2020 edition。 。。。more

William Oliveira

É um livro bem maçante, que funciona muito bem como documentação。 Mas, se o objetivo for aprender JavaScript, talvez seja melhor pegar um livro pequeno e mais simples/orientado a prática primeiro。 Depois leia essa Bíblia para aprender as minúcias。

Saleh Rahimzadeh

A comprehensive and sophisticated book to learn JavaScript and HTML API DOM。

David Enoch

One of the finest I have ever read in the world of computer programming

Sébastien

Comprehensive

Rick Dikeman

Thorough resource for an often maligned but endlessly useful and accessible language。

Gabor Zelenak

definitely a must have book

Graham

The book 'Javascript: The Definitive Guide' by David Flanagan is a great book that does a great job explaining the aspects of Javascript。 From how to integrate Javascript into your webpage to how to make classes and methods this book has you covered。 For example, when I just started reading this book, I was trying to make a website login form with XML。 But, page 479 had me covered。 It said, "var request = new ActiveXObject('Msxml2。XMLHTTP')" and this taught me more about how to use GET methods i The book 'Javascript: The Definitive Guide' by David Flanagan is a great book that does a great job explaining the aspects of Javascript。 From how to integrate Javascript into your webpage to how to make classes and methods this book has you covered。 For example, when I just started reading this book, I was trying to make a website login form with XML。 But, page 479 had me covered。 It said, "var request = new ActiveXObject('Msxml2。XMLHTTP')" and this taught me more about how to use GET methods in Javascript。 But on page 541 it goes into the deep stuff to explain how Javascript works。 The only reason it may not have five stars is because of the length of the book。 It took me a while。 Overall this book deserves high appraise。 。。。more

Thiago

A bit outdated for today's web standards but still decent。 A must see after reading it is: https://www。destroyallsoftware。com/ta。。。 A bit outdated for today's web standards but still decent。 A must see after reading it is: https://www。destroyallsoftware。com/ta。。。 。。。more

Виталий Мещеряков

Понять js。 Лежит тут Z:\PROGRAMMING\FRONT-END\[BOOKS] JavaScript。 Подробное руководство

Wilson Jimenez

ReviewUnopinionated guide of pretty much every JS detail, it doesn't get into many suggestions on JS features to avoid or anything like it, the purpose is to explore the complete breadth and depth of the language available to you (up until ES5)。 I don't think it's a learn-to-program guide to complete beginners, for instance, not like Eloquent JavaScript by Marijn Haverbeke。I feel the book should've covered the event loop which is fundamental in order to completely understand JavaScript's sin ReviewUnopinionated guide of pretty much every JS detail, it doesn't get into many suggestions on JS features to avoid or anything like it, the purpose is to explore the complete breadth and depth of the language available to you (up until ES5)。 I don't think it's a learn-to-program guide to complete beginners, for instance, not like Eloquent JavaScript by Marijn Haverbeke。I feel the book should've covered the event loop which is fundamental in order to completely understand JavaScript's single threaded execution and event processing。I like the scripting, clever-ish style used on the code samples which stretch the dynamic nature of the language, they just keep the book interesting。 NotesStatements/Expressions- Variable names cannot start with numbers in order to recognise numbers faster。- Exponential notation: 3e3 = 3 * (10^3), 3e-3 = 3 * (10^-3)。- Underflow: when the result of an operation returns a value closer to zero than the smallest representable number。* Result is 0 unless it happens from a negative number, when result is -0 like -Number。MIN_VALUE/2 or -1/INFINITY。- Division by zero = NaN。- Number。MAX_VALUE + 1 = Number。POSITIVE_INFINITY。- NaN is the only value not equal to itself。- -0 == 0 but 1/-0 != 1/0 (cause INFINITY != -INFINITY)。- Manipulate monetary values as integer cents to avoid rounding issues。- JS uses UTF-16 for encoding strings。- Strings are sequences of 16-bit values, some unicode chars whose code points don't fit, are stored using two 16-bit values known as a surrogate pair。* String manipulation methods aren't aware of surrogate pairs。- Using 。 or [] to access props on null or undefined causes a TypeError。- Strings are converted to objects (new String(val)) when accessing its properties, once properties are resolved, the object is discarded, same of Number() and Boolean()。- When comparing objects: object to string conversions use toString() then valueOf, object to number is the opposite, trying the second property method if the first doesn't return a primitive value and then converting to a string or number respectively。- The ==, != and + operators use a special object to primitive conversion, valueOf() first and then toString(), for Dates is the opposite, using the result directly without forcing it to a number or string。- <, -, and other operators, same as above without the Date special case。- An expression is evaluated to produce some value。- A statement is executed to make something happen。* Statements are formed by combining expressions。- Labeled statements have local scope, so they're only visible to inner continue and break statements。- Labeled statements and variables have different namespaces, which means they can use the same identifiers。- If a finally block throws an exception, that one overrides any other exception thrown in the try block。* If it issues a return, it returns normally even if there are still not handled exceptions。- toLocaleString() returns a localised version。- Assignments return the value just assigned: (t = typeof o) !== "object")。Objects- Use getters and setters to make object properties read/write only, and to add custom logic on read/write。- Object。create(MyObject) is the same as "new MyObject()", it creates a new object and assigns the prototype of the passed in constructor as its prototype。- If constructors functions return a primitive value, it is discarded and an object is returned。- Object。defineProperties() creates configurable properties。- Data properties: the normal ones。- Accessor properties: props with getters and/or setters。- Object。getOwnPropertyDescriptor() gets the configuration object。- toString() returns the class of an object: "[object Regexp]"。- Calling JSON。stringify() calls the method toJSON() if present on an object。- Object。preventExtensions(): new props cannot be added, check with Object。isExtensible()。- Object。seal(): no props can be added, deleted or configured, existing ones are writable, check with Object。isSealed()。- Object。freeze(): all of the above plus readonly existing own data properties but accessor properties can still be modified, check with Object。isFrozen()。* They all return the object they are passed in Object。seal(), etc)。Arrays- var arr = new Array(10) creates a sparse array by just setting the length prop, the elements are not undefined, they don't exist so arr[1] !== undefined。* delete arr[1] creates a sparse array, removes the element without changing the length。* !(index in arr) checks for non-existing elements on sparse arrays。- Array-like objects: have indexed props and a length prop。* Arrays on top of that: always update their length prop when adding/removing elements, length is always equals array max index + one, setting length to a smaller value removes elements, setting it to a grater value creates a sparse array。- Array。isArray() just does arr。toString() === "[object Array]"。Functions- Calling functions as functions on non-strict mode:* uses the global scope as the invocation context or if null/undefined is passed to bind, call, apply。* converts primitive values to their object representation if passed to bind, call, apply。- Calling them on strict mode:* defaults invocation context to undefined。* uses null/undefined and don't convert primitives to objects on bind, call, apply。- Parenthesis are optional for constructors without arguments: new Object === new Object()。- Variadic/varargs: function with indefinite arity (multiple arguments)。- Remember you can use static props/methods on functions。- toString() normally returns a string representation of the function including the body。- You can create functions with the The Function() constructor。* They don't use lexical scoping, meaning they don't create closures around their parent function and always compile as if they were top-level functions declared in the global scope, so references to parent functions variables will fail。Classes and Modules- Functions get a prototype with a single nonenumerable property: constructor。- For all functions fn the prototype constructor points back to them: fn。prototype。constructor === fn。* So objects created by these functions inherit a constructor which points back to the function that created them。- Instance fields: are created inside the function (this。val = some_argument)。- Inherited fields/methods: are added to the prototype。- Static fields/methods: are added to the function (myFn。staticMethod = 。。。)。- instanceOf returns true if the function is part of the object's prototype chain。* One shortcoming is that it won't work if there are multiple execution contexts like different iframes on a browser cause each frame will have their own version of the objects, i。e。 not the same objects。* So maybe using myObject。toString() which returns "[object myClass]" is more reliable than instanceOf or checking equality agains the constructor function。* Combine toString() and valueOf() to create interesting enumerated types。Regular Expressions- [\b] a literal backspace。- \b is a word boundary。- [^。。。] any char not between the brackets。- (。。。) capturing group。- refer to capturing groups。- (?: 。。。) group only without capturing。- (?=p) positive lookahead, require that following characters match "p" but don't include them in the match。- (?!p) negative lookahead。- string。search() same as indexOf() but with regex。- string。split() accepts regex。- /。。。/。exec() keeps state and updates a lastIndex prop every time is called, reset the prop to 0 to start from the beginning。JS Subsets and Extensions- Describes JS The Good Parts- It's interesting how this 7-8 year old book is describing ES6, 7 features like: cost, let, destructuring, iterators, generators。 As being already included in Mozilla's SpiderMonkey JS engine。- Rhino is a JS implementation written on Java, it allows access to Java APIs in JS。Client-Side JS- You can embed JS in a page using the script tag, html event handlers, javascript: URLs。- 。- Use arbitrary type="" attributes in script tags to embed content, browsers won't attempt to parse tags with not recognised types。- Security* Opening new windows can only happen in most cases in response to user input like click。* JS code can close windows it opened itself but not others without user confirmation。* The value prop of FileUpload elements cannot be set。* Same origin is defined as the protocol, host and port of a document。* Same origin applies for the origin of the document where the script is loaded and not the src attr of the script itself, i。e。 if a host A includes a script hosted by host B, that script has full access to document B (the one who loaded it) and not document A (the one who hosts it)。* It's the reason you can load scripts hosted by, let's say, a CDN into your page。* You can relax the same-origin policy by setting the domain prop of the Document to something like site。com rather than subdomain。site。com, for all documents/windows you need (e。g。 iframes)。* Can use the postMessage() method on window to communicate between fames。* Access-Control- Allow-Origin for relaxing same-origin policy。The Window Object- window。location === document。location- document。URL is the url of the document when it first loaded, not including hash changes。- decodeURIComponent() to decode query strings or other URL parts。- location。assign() loads a specific page, 。replace() replaces the browser history entry。- Cause page updates:* location = "next-page。com" (relative or absolute)。* location = "#top"。* location。search = "?abc=123"。- history。back(), 。forward(), 。go()。- You can access the history size (history。length) but not the actual URLs。- Using 。open() and 。write() on an iframe can be a way of saving history state on SPA's without modifying the actual document。- screen。availHeight and width have the available size, not including the task bar, etc。- window。onerror = (msg, url, line) => {} for capturing unhandled errors, holdover from when JS didn't include try/catch, must return true/false to signal handling, otherwise error will get to the console。- HTML elements with an id attr get added to the global object if there isn't a prop or global variable with the same name, same for name attr on elements that support it (form, form fields, img, iframe), holdover from early JS days。- Scripts can interact with multiple windows opened by them (subject to same origin policy)。* window。open()。opener contains the opener if opened by 。open()。- Accessing frames returns the frame window object:* window。frames['f1'] / window。frames。f1 / window。f1 / window[1]。- What we call window is actually a WindowProxy that refers to the real window object。Scripting Documents- images, forms, links; are props of document, holdover from early days containing HTMLCollection of those element types (only anchor tags with s offset recursively。* clientWidth and height is the content size including padding, same as scrollWidth when there's no overflow, zero for inline elements。* clientLeft and top is the border size。- Calling form。submit() does not trigger the onsubmit handler。- document。referrer: link to the page who brought you here (same as HTTP referrer header)。* lastModified, domain, cookie, title。- document。designMode = 'on' to set the whole document to 'contentditatble'。* document。execCommand(): runs edit commands on editable elements just like a rich text editor。Scripting CSS- el。style。cssText and el。setAttribute('style', val)。- e。style only has inline style attribute, window。getComputedStyle(el, null) for all styles。* relative values (percent, points) are converted to pixels。* colours to rgb(), rgba()。* no shorthand properties。- document。styleSheets[i]* 。disabled = true。* 。cssRules array contains also @import and @page directives。Handling Events- Return value is only significant on handlers registered as properties like onbeforeunload。- Event propagation phases:* 1st: capturing。* 2nd: trigger target event handlers。* 3rd: bubbling。* readystatechange is invoked right before window。load so maybe DOMContentLoaded is better (invoked when DOM is parsed and deferred scripts complete)。Scripted HTTP- Ajax could be done by setting the src of an img tag and passing query strings which triggers a GET, the server must respond with an image, even a 1x1 pixels (web bugs)。* Set the src of a hidden iframe, traversing iframes is subject to same-origin policy。* Set the src of a script tag, which is not subject to same-origin and can do cross-domain communication, data returned is JSON-encoded。^ Called JSONP: cause your service must send a padded-JSON response, i。e。 passing the response as the argument to the passed callback which is then executed when the script downloads。- Content-Length, Date, Referrer, User-Agent headers are added automatically by XHR。* as well as handling cookies, charset, encoding, connection lifetime。- XHR request construction must follow an order:* req。open()。* req。setRequestHeader()。* req。send()。- req。responseText for text MIME types。* req。responseXML for parsed, traversable HTML documents。* can override response MIME types and charset to prevent incorrect parsing。* FormData() can be used to transfer multipart/form-data which can include multiple file uploads and other data types。- CORS has to be supported by the browser。* XHR doesn't send usernames, pwd, cookies or HTTP authentication tokens as part of CORS requests。- EventSource API for server sent events。Client-Side Storage- Cookies, old API designed for server-side scripting, they're appended to every HTTP request, tend to store small pieces of data, implemented as an extension of HTTP。* Cookie in computing: small chunk of privileged or secret data。* Default lifetime is the browser process (not the tab), can be changed using max-age。* Default scope includes url path as well, can be changed to whole site by path='/'。* Values can't have commas, semicolons, spaces, store encoded with encodeURIComponent()。* All cookies are stored as a string in document。cookie divided by semicolons。- Web Storage is newer, easier API, used to enhance user experience。* shared by same-origin (protocol, host, port)。* not shared among browser vendors。* can trigger change events。- Cache Manifest: store the whole app locally。- localStorage is permanent。- sessionStorage has tab-scope also, dies when the tab is closed (may still be there is same tab is reopened)。HTML5 APIs- History can hold state, including types like imageData, date, file。* It takes in a Structured Clone as state param (deep copy or clone)。- postMessage() allow cross-origin communication between windows。- WebWorker can receive a structured clone as well。* Use the synchronous self。importScripts() inside workers。- Typed arrays hold only numbers and are way faster than normal arrays。* They're views of an underlying ArrayBuffer。* Use the DataView type to modify ArrayBuffer。- URL。createObjectURL() for BLOB, File, MediaStream。* URL。revokeObjectURL() to allow for garbage collection。 。。。more

Nassim Daoud

It was amazing at the time now it needs to be updated。

Oleksandr Bilyk

I have read only first 300 pages (1st part Core Java Script)。 The rest of book are 300-700 pages about Client Side and NodeJs - I may read them if will need to do some client side development。 Also have done quick review of ECMAScript 6 http://es6-features。org/#Constants I have read only first 300 pages (1st part Core Java Script)。 The rest of book are 300-700 pages about Client Side and NodeJs - I may read them if will need to do some client side development。 Also have done quick review of ECMAScript 6 http://es6-features。org/#Constants 。。。more

Pavel Shchegolevatykh

Great book to learn the basics of ES5。 It covers almost every topic。 Though it feels a bit dated in 2017。 All the topics and aspects of the language and client side API covered with equal importance and volume, even parts you would never use these days。 I believe this makes the book larger than it should be。

Jim

Comprehensive JavaScript reference。

Taylor Young

This is an excellent reference for those looking to explore the depths of JavaScript。 Every little intimate detail of JavaScript is covered by the author in this comprehensive review of the scripting language。 It has been a great tool for me when doing web development work, or when I am looking to expand my knowledge on certain concepts。 Certainly not a book for beginners, this guide is more for those who have prior development experience。

Elizabeth

Es dificil dar una opinión objetiva con este libro dado que javascript realmente no me gustó。 Además, me parece que el libro no me facilitó la tarea del aprendizaje。 Se me hizo desordenado (y aburrido)。 Aunque he de reconocer que la portada me gustó mucho。