JavaScript for impatient programmers

JavaScript for impatient programmers

Author
Axel Rauschmayer
Language
English
Year
2019
File Type
pdf
File Size
6.7 MiB

JavaScript for impatient programmersJavaScript for impatient programmersAbout this book (ES2019 edition)About the contentPreviewing and buying this bookAbout the authorAcknowledgementsFAQ: Book and supplementary materialHow to read this bookI own a digital editionI own the print editionNotations and conventionsWhy JavaScript? (bonus)The cons of JavaScriptThe pros of JavaScriptPro and con of JavaScript: innovationThe nature of JavaScript (bonus)JavaScript’s influencesThe nature of JavaScriptTips for getting started with JavaScriptHistory and evolution of JavaScriptHow JavaScript was createdStandardizing JavaScriptTimeline of ECMAScript versionsEcma Technical Committee 39 (TC39)The TC39 processFAQ: TC39 processEvolving JavaScript: Don’t break the webFAQ: JavaScriptWhat are good references for JavaScript?How do I find out what JavaScript features are supported where?Where can I look up what features are planned for JavaScript?Why does JavaScript fail silently so often?Why can’t we clean up JavaScript, by removing quirks and outdated features?How can I quickly try out a piece of JavaScript code?The big pictureWhat are you learning in this book?The structure of browsers and Node.jsJavaScript referencesFurther readingSyntaxAn overview of JavaScript’s syntax(Advanced)IdentifiersStatement vs. expressionAmbiguous syntaxSemicolonsAutomatic semicolon insertion (ASI)Semicolons: best practicesStrict mode vs. sloppy modeConsoles: interactive JavaScript command linesTrying out JavaScript codeThe console.* API: printing data and moreAssertion APIAssertions in software developmentHow assertions are used in this bookNormal comparison vs. deep comparisonQuick reference: module assertGetting started with quizzes and exercisesQuizzesExercisesUnit tests in JavaScriptVariables and assignmentletconstDeciding between const and letThe scope of a variable(Advanced)Terminology: static vs. dynamicGlobal variables and the global objectDeclarations: scope and activationClosuresFurther readingValuesWhat’s a type?JavaScript’s type hierarchyThe types of the language specificationPrimitive values vs. objectsThe operators typeof and instanceof: what’s the type of a value?Classes and constructor functionsConverting between typesOperatorsMaking sense of operatorsThe plus operator (+)Assignment operatorsEquality: == vs. ===Ordering operatorsVarious other operatorsThe non-values undefined and nullundefined vs. nullOccurrences of undefined and nullChecking for undefined or nullundefined and null don’t have propertiesThe history of undefined and nullBooleansConverting to booleanFalsy and truthy valuesTruthiness-based existence checksConditional operator (? :)Binary logical operators: And (x && y), Or (x || y)Logical Not (!)NumbersJavaScript only has floating point numbersNumber literalsArithmetic operatorsConverting to numberError valuesError value: NaNError value: InfinityThe precision of numbers: careful with decimal fractions(Advanced)Background: floating point precisionIntegers in JavaScriptBitwise operatorsQuick reference: numbersMathData propertiesExponents, roots, logarithmsRoundingTrigonometric FunctionsVarious other functionsSourcesUnicode – a brief introduction (advanced)Code points vs. code unitsEncodings used in web development: UTF-16 and UTF-8Grapheme clusters – the real charactersStringsPlain string literalsAccessing characters and code pointsString concatenation via +Converting to stringComparing stringsAtoms of text: Unicode characters, JavaScript characters, grapheme clustersQuick reference: StringsUsing template literals and tagged templatesDisambiguation: “template”Template literalsTagged templatesRaw string literals(Advanced)Multiline template literals and indentationSimple templating via template literalsSymbolsUse cases for symbolsPublicly known symbolsConverting symbolsControl flow statementsConditions of control flow statementsControlling loops: break and continueif statementsswitch statementswhile loopsdo-while loopsfor loopsfor-of loopsfor-await-of loopsfor-in loops (avoid)Exception handlingMotivation: throwing and catching exceptionsthrowThe try statementError classesCallable valuesKinds of functionsOrdinary functionsSpecialized functionsMore kinds of functions and methodsReturning values from functions and methodsParameter handlingDynamically evaluating code: eval(), new Function() (advanced)Environments: under the hood of variables (bonus)Environment: data structure for managing variablesRecursion via environmentsNested scopes via environmentsClosures and environmentsModulesOverview: syntax of ECMAScript modulesJavaScript source code formatsBefore we had modules, we had scriptsModule systems created prior to ES6ECMAScript modulesNamed exports and importsDefault exports and importsMore details on exporting and importingnpm packagesNaming modulesModule specifiersLoading modules dynamically via import()Preview: import.meta.urlPolyfills: emulating native web platform features (advanced)Single objectsWhat is an object?Objects as recordsSpreading into object literals (...)MethodsObjects as dictionaries (advanced)Standard methods (advanced)Advanced topicsPrototype chains and classesPrototype chainsClassesPrivate data for classesSubclassingFAQ: objectsSynchronous iterationWhat is synchronous iteration about?Core iteration constructs: iterables and iteratorsIterating manuallyIteration in practiceQuick reference: synchronous iterationArrays (Array)The two roles of Arrays in JavaScriptBasic Array operationsfor-of and ArraysArray-like objectsConverting iterable and Array-like values to ArraysCreating and filling Arrays with arbitrary lengthsMultidimensional ArraysMore Array features (advanced)Adding and removing elements (destructively and non-destructively)Methods: iteration and transformation (.find(), .map(), .filter(), etc.).sort(): sorting ArraysQuick reference: ArrayTyped Arrays: handling binary data (Advanced)The basics of the APIElement typesMore information on Typed ArraysQuick references: indices vs. offsetsQuick reference: ArrayBuffersQuick reference: Typed ArraysQuick reference: DataViewsMaps (Map)Using MapsExample: Counting charactersA few more details about the keys of Maps (advanced)Missing Map operationsQuick reference: MapFAQ: MapsWeakMaps (WeakMap)WeakMaps are black boxesThe keys of a WeakMap are weakly heldExamplesWeakMap APISets (Set)Using SetsExamples of using SetsWhat Set elements are considered equal?Missing Set operationsQuick reference: SetFAQ: SetsWeakSets (WeakSet)Example: Marking objects as safe to use with a methodWeakSet APIDestructuringA first taste of destructuringConstructing vs. extractingWhere can we destructure?Object-destructuringArray-destructuringExamples of destructuringWhat happens if a pattern part does not match anything?What values can’t be destructured?(Advanced)Default valuesParameter definitions are similar to destructuringNested destructuringSynchronous generators (advanced)What are synchronous generators?Calling generators from generators (advanced)Background: external iteration vs. internal iterationUse case for generators: reusing traversalsAdvanced features of generatorsAsynchronous programming in JavaScriptA roadmap for asynchronous programming in JavaScriptThe call stackThe event loopHow to avoid blocking the JavaScript processPatterns for delivering asynchronous resultsAsynchronous code: the downsidesResourcesPromises for asynchronous programmingThe basics of using PromisesExamplesError handling: don’t mix rejections and exceptionsPromise-based functions start synchronously, settle asynchronouslyPromise.all(): concurrency and Arrays of PromisesTips for chaining PromisesAdvanced topicsAsync functionsAsync functions: the basicsReturning from async functionsawait: working with Promises(Advanced)Immediately invoked async arrow functionsConcurrency and awaitTips for using async functionsAsynchronous iterationBasic asynchronous iterationAsynchronous generatorsAsync iteration over Node.js streamsRegular expressions (RegExp)Creating regular expressionsSyntaxFlagsProperties of regular expression objectsMethods for working with regular expressionsFlag /g and its pitfallsTechniques for working with regular expressionsDates (Date)Best practice: avoid the built-in DateTime standardsBackground: date time formats (ISO)Time valuesCreating DatesGetters and settersConverting Dates to stringsCreating and parsing JSON (JSON)The discovery and standardization of JSONJSON syntaxUsing the JSON APICustomizing stringification and parsing (advanced)FAQNext steps: overview of web development (bonus)Tips against feeling overwhelmedThings worth learning for web developmentExample: tool-based JavaScript workflowAn overview of JavaScript toolsTools not related to JavaScriptIndex

show more...

How to Download?!!!

Just click on START button on Telegram Bot

Free Download Book