JavaScript for impatient programmers 1st Edition by Axel Rauschmayer ISBN 1091210098 9781091210097pdf download
JavaScript for impatient programmers 1st Edition by Axel Rauschmayer ISBN 1091210098 9781091210097pdf download
https://ebookball.com/product/javascript-for-impatient-
programmers-1st-edition-by-axel-rauschmayer-
isbn-1091210098-9781091210097-20226/
Java SE 8 for the Really Impatient 1st Edition by Cay S Horstmann ISBN
0321927761 978-0321927767
https://ebookball.com/product/java-se-8-for-the-really-
impatient-1st-edition-by-cay-s-horstmann-
isbn-0321927761-978-0321927767-12112/
Visual Studio Code for Python Programmers 1st Edition by April Speight
1119773369 9781119773368
https://ebookball.com/product/visual-studio-code-for-python-
programmers-1st-edition-by-april-
speight-1119773369-9781119773368-18520/
TORMCA Tool for Regular Model Checking 1st edition by Axel Legay ISBN
3540705437 9783540705437
https://ebookball.com/product/tormca-tool-for-regular-model-
checking-1st-edition-by-axel-legay-
isbn-3540705437-9783540705437-13428/
JavaScript and Ajax for Dummies 1st Edition by Andy Harris ISBN
0470417994 9780470417997
https://ebookball.com/product/javascript-and-ajax-for-
dummies-1st-edition-by-andy-harris-
isbn-0470417994-9780470417997-13728/
Professional JavaScript for Web Developers 1st Edition by Nicholas C
Zakas ISBN 1118026691 9781118026694
https://ebookball.com/product/professional-javascript-for-web-
developers-1st-edition-by-nicholas-c-zakas-
isbn-1118026691-9781118026694-16162/
(Ebook PDF) Shaders for Game Programmers & Artists 1st edition by
Sebastien St Laurent ‎1592000924 978-1592000920
https://ebookball.com/product/ebook-pdf-shaders-for-game-
programmers-artists-1st-edition-by-sebastien-st-laurent-
aeurz1592000924-978-1592000920-22716/
Intel Galileo and Intel Galileo Gen 2 API Features and Arduino
Projects for Linux Programmers 1st edition by Manoel Ramon ISBN
1430268395 978-1430268390
https://ebookball.com/product/intel-galileo-and-intel-galileo-
gen-2-api-features-and-arduino-projects-for-linux-
programmers-1st-edition-by-manoel-ramon-
isbn-1430268395-978-1430268390-20336/
An Approach for Model Based Risk Assessment 1st Edition by Bjorn Axel
Gran, Rune Fredriksen, Atoosa PJ Thunem ISBN 9783540301387
https://ebookball.com/product/an-approach-for-model-based-risk-
assessment-1st-edition-by-bjorn-axel-gran-rune-fredriksen-atoosa-
pj-thunem-isbn-9783540301387-12986/
https://ebookball.com/product/javascript-mini-faq-1st-edition-by-
danny-goodman-isbn-11420/
JavaScript for impatient
programmers
Dr. Axel Rauschmayer
2019
JavaScript for impatient
programmers
JavaScript for impatient programmers
1 About this book (ES2019 edition)
1.1 About the content
1.2 Previewing and buying this book
1.3 About the author
1.4 Acknowledgements
2 FAQ: Book and supplementary material
2.1 How to read this book
2.2 I own a digital edition
2.3 I own the print edition
2.4 Notations and conventions
6 FAQ: JavaScript
6.1 What are good references for JavaScript?
6.2 How do I find out what JavaScript features are supported
where?
6.3 Where can I look up what features are planned for
JavaScript?
6.4 Why does JavaScript fail silently so often?
6.5 Why can’t we clean up JavaScript, by removing quirks and
outdated features?
6.6 How can I quickly try out a piece of JavaScript code?
7 The big picture
7.1 What are you learning in this book?
7.2 The structure of browsers and Node.js
7.3 JavaScript references
7.4 Further reading
8 Syntax
8.1 An overview of JavaScript’s syntax
8.2 (Advanced)
8.3 Identifiers
8.4 Statement vs. expression
8.5 Ambiguous syntax
8.6 Semicolons
8.7 Automatic semicolon insertion (ASI)
8.8 Semicolons: best practices
8.9 Strict mode vs. sloppy mode
10 Assertion API
10.1 Assertions in software development
10.2 How assertions are used in this book
10.3 Normal comparison vs. deep comparison
10.4 Quick reference: module assert
13 Values
13.1 What’s a type?
13.2 JavaScript’s type hierarchy
13.3 The types of the language specification
13.4 Primitive values vs. objects
13.5 The operators typeof and instanceof: what’s the type of a
value?
13.6 Classes and constructor functions
13.7 Converting between types
14 Operators
14.1 Making sense of operators
14.2 The plus operator (+)
14.3 Assignment operators
14.4 Equality: == vs. ===
14.5 Ordering operators
14.6 Various other operators
16 Booleans
16.1 Converting to boolean
16.2 Falsy and truthy values
16.3 Truthiness-based existence checks
16.4 Conditional operator (? :)
16.5 Binary logical operators: And (x && y), Or (x || y)
16.6 Logical Not (!)
17 Numbers
17.1 JavaScript only has floating point numbers
17.2 Number literals
17.3 Arithmetic operators
17.4 Converting to number
17.5 Error values
17.6 Error value: NaN
17.7 Error value: Infinity
17.8 The precision of numbers: careful with decimal fractions
17.9 (Advanced)
17.10 Background: floating point precision
17.11 Integers in JavaScript
17.12 Bitwise operators
17.13 Quick reference: numbers
18 Math
18.1 Data properties
18.2 Exponents, roots, logarithms
18.3 Rounding
18.4 Trigonometric Functions
18.5 Various other functions
18.6 Sources
20 Strings
20.1 Plain string literals
20.2 Accessing characters and code points
20.3 String concatenation via +
20.4 Converting to string
20.5 Comparing strings
20.6 Atoms of text: Unicode characters, JavaScript characters,
grapheme clusters
20.7 Quick reference: Strings
22 Symbols
22.1 Use cases for symbols
22.2 Publicly known symbols
22.3 Converting symbols
24 Exception handling
24.1 Motivation: throwing and catching exceptions
24.2 throw
24.3 The try statement
24.4 Error classes
25 Callable values
25.1 Kinds of functions
25.2 Ordinary functions
25.3 Specialized functions
25.4 More kinds of functions and methods
25.5 Returning values from functions and methods
25.6 Parameter handling
25.7 Dynamically evaluating code: eval(), new Function()
(advanced)
26 Environments: under the hood of variables (bonus)
26.1 Environment: data structure for managing variables
26.2 Recursion via environments
26.3 Nested scopes via environments
26.4 Closures and environments
27 Modules
27.1 Overview: syntax of ECMAScript modules
27.2 JavaScript source code formats
27.3 Before we had modules, we had scripts
27.4 Module systems created prior to ES6
27.5 ECMAScript modules
27.6 Named exports and imports
27.7 Default exports and imports
27.8 More details on exporting and importing
27.9 npm packages
27.10 Naming modules
27.11 Module specifiers
27.12 Loading modules dynamically via import()
27.13 Preview: import.meta.url
27.14 Polyfills: emulating native web platform features
(advanced)
28 Single objects
28.1 What is an object?
28.2 Objects as records
28.3 Spreading into object literals (...)
28.4 Methods
28.5 Objects as dictionaries (advanced)
28.6 Standard methods (advanced)
28.7 Advanced topics
36 WeakSets (WeakSet)
36.1 Example: Marking objects as safe to use with a method
36.2 WeakSet API
37 Destructuring
37.1 A first taste of destructuring
37.2 Constructing vs. extracting
37.3 Where can we destructure?
37.4 Object-destructuring
37.5 Array-destructuring
37.6 Examples of destructuring
37.7 What happens if a pattern part does not match anything?
37.8 What values can’t be destructured?
37.9 (Advanced)
37.10 Default values
37.11 Parameter definitions are similar to destructuring
37.12 Nested destructuring
42 Asynchronous iteration
42.1 Basic asynchronous iteration
42.2 Asynchronous generators
42.3 Async iteration over Node.js streams
47 Index
JavaScript for impatient
programmers
1 About this book (ES2019
edition)
Highlights:
There are several ways in which you can read this book. One of them
involves skipping much of the content in order to get started quickly.
For details, see §2.1.1 “In which order should I read the content in
this book?”.
1.2 Previewing and buying this
book
1.2.1 How can I preview the book, the
exercises, and the quizzes?
The home page of this book describes how you can buy them.
This chapter answers questions you may have and gives tips for
reading this book.
2.1 How to read this book
2.1.1 In which order should I read the
content in this book?
As your knowledge evolves, you can later come back to some or all of
the advanced content.
The bonus chapters are only available in the paid versions of this
book (print and ebook). They are listed in the full table of contents.
2.2 I own a digital edition
2.2.1 How do I submit feedback and
corrections?
The HTML version of this book (online, or ad-free archive in the paid
version) has a link at the end of each chapter that enables you to give
feedback.
The receipt email for the purchase includes a link. You’ll always
be able to download the latest version of the files at that
location.
Yes. The instructions for doing so are on the homepage of this book.
2.3 I own the print edition
2.3.1 Can I get a discount for a digital
edition?
If you bought the print edition, you can get a discount for a digital
edition. The homepage of the print edition explains how.
Alas, the reverse is not possible: you cannot get a discount for the
print edition if you bought a digital edition.
On the homepage of the print edition, you can submit errors and see
submitted errors.
The homepage of the print edition has a list with all the URLs that
you see in the footnotes of the print edition.
2.4 Notations and conventions
2.4.1 What is a type signature? Why am I
seeing static types in this book?
Why is this notation being used? It helps give you a quick idea of how
a function works. The notation is explained in detail in a 2ality blog
post, but is usually relatively intuitive.
Reading instructions
External content
Question
Warning
Details
Exercise
Quiz
3.2.1 Community
With JavaScript, you can write apps for many client platforms. These
are a few example technologies:
3.2.3 Language
Quiz
> 1 / 0
Infinity
The reason for the silent failures is historical: JavaScript did not have
exceptions until ECMAScript 3. Since then, its designers have tried
to avoid silent failures.
4.3 Tips for getting started with
JavaScript
These are a few tips to help you get started with JavaScript:
The idea was that major interactive parts of the client-side web were
to be implemented in Java. JavaScript was supposed to be a glue
language for those parts and to also make HTML slightly more
interactive. Given its role of assisting Java, JavaScript had to look
like Java. That ruled out existing solutions such as Perl, Python, TCL,
and others.
If too much time passes between releases then features that are
ready early, have to wait a long time until they can be released.
And features that are ready late, risk being rushed to make the
deadline.
Pick champions
Spec complete
Kun hän tuli kotia Marinan luo, surivat tosin molemmat vanhukset;
mutta Janne oli silloinkin tavattoman lempeä, — "kullakin on oma
karinsa vältettävänä", sanoi hän ja lisäsi, että "Martin
onnettomuutena on ollut tuo hieno neitonen".
Mitä nyt tapahtui näiden kahden miehen välillä, sitä ei voi aivan
tarkoin esittää.
Martti niin sanoaksemme paloitteli Stuwitzin nuoruudenelämän
pieniin kappaleisiin. Hän ei jättänyt mainitsematta mitään, mitä vain
tiesi, ja alkoi sitten katkeralla ivalla selvitellä hänen suhteitaan
Heggelundiin. Stuwitzin kasvoilla ilmeni sanomattoman arkaa hätää;
hänen nolo, mateleva katseensa muistutti petoeläintä, joka
hädissään kiertää edestakaisin kuopassa, johon se äkkiä on
pudonnut. Tämän arkamaisuuden jälkeen hänet valtasi hetkiseksi
raivonpuuska, ja näytti siltä kuin hän olisi tahtonut ryhtyä
väkivaltaan. Mutta Martin katse sai hänet taas asettumaan.
Edel tarjosi itse hänelle teetä, ja kun hän mainitsi Amerikan tärisi
kuppi tytön kädessä. Martti huomasi Edelin kalpeuden sekä salaisen
myötätuntoisuuden ja tunsi jonkunlaisella surulla, ettei tyttö ollut
koskaan häntä niin lähellä kuin nyt — olihan tytön käytöksessä
jotain, joka melkein näytti tunnustavan, että syy oli hänen.
Martti oli noussut ylös ja seisoi nyt tytön vieressä. — "Ja nyt" —
hän lisäsi surullisella äänellä, "nyt, kun minä en ehkä koskaan enää
saa nähdä teitä tässä elämässä, tahdon minä pyytää teitä
säilyttämään erään esineen, joka on minulle erittäin kallis, äitini
rintaneulan; minua ilahduttaisi suuresti, jos tietäisin teidän kantavan
sitä."
Hän aikoi ojentaa tytölle neulan, mutta käsi, joka otti sen vastaan,
vapisi, ja hän luki Edelin kasvoista ja hänen kyyneltyneistä
silmistään, että tyttökin rakasti häntä. Martti unohti kaiken ja veti
tytön luoksensa; mutta kohta sen jälkeen hän malttoi mielensä ja
sanoi vitkaan: "Mitenkäs tulevaisuus?"
*****
Kun Martti Jansen tuli kotia, oli häntä vastassa useita henkilöitä,
jotka koettivat hänen kasvoistaan arvata, miten matkalla oli käynyt,
ja niiden joukossa myöskin Matti Nutto. Mutta hänpä ei voinut tehdä
muuta päätöstä kuin että matka oli onnistunut hyvin. Marinalta hän
sai seuraavana päivänä kuulla, kuinka asian oli käynyt.
Tänä päivänä istui Antti salissa ja puheli serkkunsa kanssa. Edel oli
hyvin iloinen ja näköjään samaa mieltä Antin kanssa, kun jälleen tuli
puheeksi se, että sivistyksen yksinomaiset kannattajat maassa olivat
ylioppilaat. Hän oli tosin vastannut jotain, josta Antti ei tiennyt, oliko
se pistopuhetta vai ei, ja tämä siveli senvuoksi mustaa
leukapartaansa; mutta Edelin viaton katse rauhoitti hänet. Tyttö oli
sanonut:
Tuskin oli Antti lukenut paperin, kun hän riensi saliin ilmoittamaan,
että Martti Jansen oli nyt pelastettu; — hänellä oli kädessä kirjallinen
todistus siitä, ja hän aikoi juuri hyökätä samaa vauhtia ilmoittamaan
asiata enollensa, kun Edel kalpeana ojensi kätensä saadaksensa
paperin. Kun tyttö oli lukenut kirjoituksen pari kertaa ja sitten vielä
kolmannen kerran, katsoi hän loistavin silmin Anttiin ja sanoi äkillisen
kiitollisuuden-tunteen valtaamana:
"Koska sinä, Antti, olet tuonut minulle tämän sanoman, niin saat
myös olla ensimäinen, jolle minä ilmoitan kihlaukseni Martti Jansenin
kanssa — vaikkei hän olekaan mikään 'sivistynyt mies'" — lisäsi hän
hiukan veitikkamaisesti; mutta tytön silmät olivat täyttyneet
kyynelillä ja hän meni itse näyttämään paperia isälleen.
VANHOJA ASIOITA.
Nyt seurasi selityksiä ja Edel kertoi, mitä hän tiesi neulasta; sitten
hän jätti ukon hänen omasta tahdostaan istumaan yksinään neula
kädessä.
Kun Edel sittemmin tuli hänen luokseen, puheli ukko tapansa
mukaan katkonaisesti:
LOPPU.
*****
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookball.com