JavaScript for impatient programmers 1st Edition by Axel Rauschmayer ISBN 1091210098 9781091210097 instant download
JavaScript for impatient programmers 1st Edition by Axel Rauschmayer ISBN 1091210098 9781091210097 instant 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
The tranquillity of this region was not always what it now is.
Standing on the northern rampart of the station, Mr. Lawson, the
aged proprietor, directed the attention of the Pilgrim-party of 1849
to a small cottage on the opposite shore. ‘There,’ said he, ‘lived a
Scottish reaver, who in the days of my grandfather made, on
nineteen successive Easter-eves, a successful foray on the English
side. A twentieth time he prepared to go; his family remonstrated,
he however persisted, saying that this should be his last attempt.
Our people were prepared for him and slew him.’ Some of the party
asked ‘what notice did the law take of the transaction?’ 'None; the
law which could not protect a man, would not punish him for taking
the law into his own hands.'
Now, nearly arrived at the western extremity of the great Barrier, we
meet with but few traces of its characteristic masonry; enough,
however, remains to lure us pleasantly to our journey’s end.
In cutting the canal from Carlisle to the Solway Firth, in 1823, a
prostrate forest of oak was discovered, which belonged to an age
anterior to that of Hadrian. The engineer of the canal says—
A subterraneous forest was cut through in the PRIMEVAL FOREST.
excavation of the canal, near the banks of the
Solway Firth, about half a mile north-west of the village of Glasson,
and extending into Kirklands. The trees were all prostrate, and they
had fallen, with little deviation, in a northerly direction, or a little
eastward of it.—Some short trunks, of two or three feet in height,
were in the position of their natural growth; but although the trees,
with the exception of their alburnum and all the branches, were
perfectly sound, yet the extremity of the trunks, whether fallen or
standing, were so rugged, that it was not discoverable whether the
trees had been cut down, or had fallen by a violent storm. The level
upon which the trunks lay, was a little below that of high tides, and
from eight to ten feet below the surface of the ground they were
embedded in; which, excepting the superficial soil, is a soft blue
clay, having the appearance of marine alluvion.... Although the
precise period when this forest fell is not ascertainable, there is a
positive proof that it must have been long prior to the building of
the Wall because the foundations of the Wall passed obliquely over
it, and lay three or four feet above the level of the trees.—Arch. Æl.
ii. 117.
The forest extends over a considerable tract of ground. It is probable
that it was overthrown by a tempest from the south or south-west, at
a time when the sea occupied a lower level than it does at present.
The wood was so sound, that it was used in common with other oak
timber in forming the jetties at the outlet of the canal into the Solway
Firth. The president’s chair of the Society of Antiquaries, Newcastle-
upon-Tyne, is formed of it.
At Port-Carlisle is a mound resembling an ancient British barrow,
called Fisher’s-cross. About half-a-mile to the westward of it is another
which has been somewhat encroached upon by the road that runs
along the margin of the Solway, and is denominated Knock’s-cross.
The proverb is common throughout Cumberland, 'As old as Knock’s-
cross.'
In the front of the Steam-packet hotel, Port-Carlisle, is built up the
fragment of a small Roman altar, bearing the inscription, SVIS MATRIBVS.
It is one of the numerous instances that we meet with, along the line
of the Wall, of altars dedicated to the Deæ Matres.
Between Port-Carlisle and Bowness, the site of
the Wall may be traced nearly the whole way; BOWNESS.
not unfrequently the foundations of it and its
fosse may be discerned. In one place some large stones resembling
those used in forming the gateways of the mile-castles will be noticed.
In Brand’s day some considerable portions of the Wall remained,
between these points. He says—
About three quarters of a mile to the east of Bowness, some
fragments of Severus’ Wall remain, of a great height; on measuring
one of them, we found it to be about eight feet high; it was bound
and overgrown with ivy in a most picturesque manner. The facing-
stones on both sides have been taken away.
On my first visit to Bowness, I saw a portion of it as Hodgson
describes it—
It is six feet high. Its rugged and weathered core, still hard as a
rock, is thickly bearded with sloe-thorn and hazel, and mantled
below with ivy and honey-suckle.
This interesting object has been entirely removed, which is the more
to be regretted, as no advantage has been gained by its destruction; it
served as a fence between two fields.
H. Burdon Richardson, Delt. John Storey
Lith.
BOWNESS.
It is not improbable that the two stations may have been under one
command. The exposed situation of Bremenium would render it highly
desirable that the exploratores, after having battled for a season with
the elements and the Caledonians, should be allowed a period of
comparative relief in some more sheltered spot, such as Habitancum.
CORSTOPITUM is the next place that occurs in
this ‘iter,’ in which it is set down as being twenty CORSTOPITUM.
miles from Bremenium. At the distance of about
twenty-three English miles from the camp of High Rochester, and on
the line of Watling-street, are now to be found the remains of the
station of Corchester.
This, which is a little to the west of the town of CORCHESTER.
Corbridge, is doubtless the ancient Corstopitum.
The station, which is now entirely levelled, and can with difficulty be
traced, has stood upon a gently swelling knoll on the north bank of
the Tyne. A bridge, the foundations of which the floods of seventeen
centuries have spared, connected it with the opposite bank of the
river; the remains of this bridge are precisely similar in appearance to
those on the North Tyne at Cilurnum. The bridge has crossed the river
obliquely, a circumstance which corroborates the opinion formerly
expressed, that the bridges in these parts consisted of horizontal
roadways, supported upon piers—unless, indeed, we suppose that the
Romans were acquainted with the construction of the skew-arch.
Hutchinson states, that a ‘military way passes from this place south-
west through Dilston Park, over Hexham Fell to Old Town in Allendale,
and meets with the Maiden-way at Whitley Castle.’ Abundance of
medals, inscriptions, and other Roman antiquities, have been found at
Corchester. Pieces of Roman bricks and pots are spread over the
surface of the ground. The church at Corbridge has been raised at the
expense of the station. Horsley conceives that this fort was
abandoned before the compilation of the Notitia, as it is not
mentioned in that document. It is about two miles south of the Wall.
The large altar which is figured in the initial letter at the beginning of
this volume, formed, in Horsley’s days, the shaft of the market-cross
at Corbridge. It is now on the stairs of the entrance-tower, at the
castle of Newcastle-upon-Tyne. The inscription is defaced, but the
carving on both sides remains; on the one side is a soldier, armed—
the representative probably of war; on the other is a warrior, having
laid aside his weapons, dragging an amphora of wine—a picture,
emblematic of peace. The singular use made of this heathen relic
suggests the insertion here of the story of the ‘Fairy stone,’ as it is still
told in this neighbourhood.
A Roman altar in the vicinity of Bywell was, during the ‘troublesome
times’ of 1715, put to a use little contemplated either by the
ancients or moderns. It was employed as the post-office of the non-
juring gentry of the district. The parties, wishing to keep up a
correspondence with each other, arranged to deposit their
communications in a hollow of the altar. In the gray of the morning
little girls clad in green, and trained to the task, approached the
stone with a dancing step, and, having got the letters, retired with
antic gestures. So well did they perform their part that they were
mistaken for fairies, and the object of their visits was not discovered
for a long time afterwards. The stone was known by the name of
the Fairy stone.
But the greatest curiosity which has been CORBRIDGE LANX.
discovered at Corstopitum, is the silver lanx, or
dish, which is represented on the next page. A piece of plate so
massive, is of rare occurrence in the stations of the North. It is in the
possession of the duke of Northumberland. There is an accurate cast
of it in the Newcastle Museum of Antiquities.
'It was found (says Mr. Robert Cay, in a letter of 4th March 1734)
near Corbridge, by some ignorant poor people who have cut off the
feet in such a vile barbarous manner, that they have broke two holes
through the table, and a small piece off one of the corners too.' It is
19½ inches long, and 15 broad; it weighs about 150 ounces. The
rim of the plate rises nearly an inch above the interior. The figures
have been punched into form. Gale’s conjecture as to its use is
probably the correct one. ‘This is big enough (he says) to contain
the exta of a sheep, or other small victims, which seems to me to be
the likeliest employment for it, and that it was one of these
sacrificing utensils that Virgil calls Lances:
ΑΣΤΑΡΤΗΣ Of Astarte,
ΒΩΜΟΝ Μ’ The altar
ΕΣΟΡΑΣ You see,
ΠΟΥΛΧΕΡ Μ’ Pulcher
ΑΝΕΘΗΚΕΝ replaced.
Josephus tells us, that Hiram king of Tyre, built two temples, which he
dedicated to these deities. The Israelites, in forsaking the living God,
not unfrequently betook themselves to the abominations of the
Sidonians.
... With these in troop
Came Astoreth, whom the Phœnicians call’d
Astarte, queen of heaven, with crescent horns;
To whose bright image nightly by the moon
Sidonian virgins paid their vows and songs,
In Sion also not unsung,...
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