100% found this document useful (4 votes)
44 views

Instant ebooks textbook Javascript info Ebook Part 1 The JavaScript language 1st Edition Ilya Kantor download all chapters

language

Uploaded by

kallonrukum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
44 views

Instant ebooks textbook Javascript info Ebook Part 1 The JavaScript language 1st Edition Ilya Kantor download all chapters

language

Uploaded by

kallonrukum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Javascript info Ebook Part 1 The JavaScript


language 1st Edition Ilya Kantor

https://textbookfull.com/product/javascript-info-ebook-
part-1-the-javascript-language-1st-edition-ilya-kantor/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Javascript info Ebook Part 3 Additional articles 1st


Edition Ilya Kantor

https://textbookfull.com/product/javascript-info-ebook-
part-3-additional-articles-1st-edition-ilya-kantor/

textboxfull.com

Javascript info Ebook Part 2 Browser Document Events


Interfaces 1st Edition Ilya Kantor

https://textbookfull.com/product/javascript-info-ebook-part-2-browser-
document-events-interfaces-1st-edition-ilya-kantor/

textboxfull.com

JavaScript Learn JavaScript in 24 Hours or Less A Beginner


s Guide To Learning JavaScript Programming Now JavaScript
JavaScript Programming 1st Edition Robert Dwight.
https://textbookfull.com/product/javascript-learn-javascript-
in-24-hours-or-less-a-beginner-s-guide-to-learning-javascript-
programming-now-javascript-javascript-programming-1st-edition-robert-
dwight/
textboxfull.com

Functional Programming in JavaScript How to improve your


JavaScript programs using functional techniques 1 edition
Edition Luis Atencio
https://textbookfull.com/product/functional-programming-in-javascript-
how-to-improve-your-javascript-programs-using-functional-
techniques-1-edition-edition-luis-atencio/
textboxfull.com
JavaScript Design Patterns 1 / converted Edition Hugo Di
Francesco

https://textbookfull.com/product/javascript-design-
patterns-1-converted-edition-hugo-di-francesco/

textboxfull.com

The Joy of JavaScript 1st Edition Atencio

https://textbookfull.com/product/the-joy-of-javascript-1st-edition-
atencio/

textboxfull.com

Practical Modern JavaScript Dive into ES6 and the Future


of JavaScript Nicolás Bevacqua

https://textbookfull.com/product/practical-modern-javascript-dive-
into-es6-and-the-future-of-javascript-nicolas-bevacqua/

textboxfull.com

Beginning Functional JavaScript. Functional Programming


with JavaScript using EcmaScript 6 1st Edition Anto
Aravinth
https://textbookfull.com/product/beginning-functional-javascript-
functional-programming-with-javascript-using-ecmascript-6-1st-edition-
anto-aravinth/
textboxfull.com

Simplifying JavaScript Writing Modern JavaScript with ES5


ES6 and Beyond 1st Edition Joe Morgan

https://textbookfull.com/product/simplifying-javascript-writing-
modern-javascript-with-es5-es6-and-beyond-1st-edition-joe-morgan/

textboxfull.com
Part 1

The JavaScript
language

Ilya Kantor
Built at July 10, 2019
The last version of the tutorial is at https://javascript.info.

We constantly work to improve the tutorial. If you find any mistakes, please write at our github.
● An introduction

An Introduction to JavaScript

Manuals and specifications
● Code editors

Developer console
● JavaScript Fundamentals
● Hello, world!
● Code structure

The modern mode, "use strict"
● Variables

Data types
● Type Conversions

Operators
● Comparisons

Interaction: alert, prompt, confirm

Conditional operators: if, '?'

Logical operators

Loops: while and for

The "switch" statement

Functions
● Function expressions and arrows
● JavaScript specials
● Code quality
● Debugging in Chrome
● Coding Style
● Comments

Ninja code
● Automated testing with mocha
● Polyfills

Objects: the basics

Objects
● Garbage collection
● Symbol type

Object methods, "this"
● Object to primitive conversion
● Constructor, operator "new"

Data types
● Methods of primitives
● Numbers
● Strings

Arrays
● Array methods
● Iterables

Map, Set, WeakMap and WeakSet

Object.keys, values, entries
● Destructuring assignment
● Date and time

JSON methods, toJSON
● Advanced working with functions
● Recursion and stack
● Rest parameters and spread operator
● Closure
● The old "var"
● Global object
● Function object, NFE
● The "new Function" syntax
● Scheduling: setTimeout and setInterval

Decorators and forwarding, call/apply
● Function binding
● Currying and partials

Arrow functions revisited
● Object properties configuration
● Property flags and descriptors

Property getters and setters
● Prototypes, inheritance
● Prototypal inheritance
● F.prototype
● Native prototypes
● Prototype methods, objects without __proto__
● Classes
● Class basic syntax
● Class inheritance
● Static properties and methods
● Private and protected properties and methods
● Extending built-in classes

Class checking: "instanceof"
● Mixins
● Error handling

Error handling, "try..catch"
● Custom errors, extending Error
● Promises, async/await
● Introduction: callbacks
● Promise
● Promises chaining
● Error handling with promises
● Promise API
● Promisification
● Microtasks
● Async/await
● Generators, advanced iteration

Generators
● Async iterators and generators
● Modules

Modules, introduction
● Export and Import
● Dynamic imports

Miscellaneous

Proxy and Reflect
● Eval: run a code string
Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP.
We concentrate on the language itself here, with the minimum of environment-specific notes.

An introduction
About the JavaScript language and the environment to develop with it.

An Introduction to JavaScript
Let’s see what’s so special about JavaScript, what we can achieve with it, and which other
technologies play well with it.

What is JavaScript?

JavaScript was initially created to “make web pages alive”.

The programs in this language are called scripts. They can be written right in a web page’s
HTML and run automatically as the page loads.

Scripts are provided and executed as plain text. They don’t need special preparation or
compilation to run.
In this aspect, JavaScript is very different from another language called Java  .

 Why JavaScript?
When JavaScript was created, it initially had another name: “LiveScript”. But Java was very
popular at that time, so it was decided that positioning a new language as a “younger
brother” of Java would help.

But as it evolved, JavaScript became a fully independent language with its own specification
called ECMAScript  , and now it has no relation to Java at all.

Today, JavaScript can execute not only in the browser, but also on the server, or actually on any
device that has a special program called the JavaScript engine  .

The browser has an embedded engine sometimes called a “JavaScript virtual machine”.

Different engines have different “codenames”. For example:


● V8  – in Chrome and Opera.
● SpiderMonkey  – in Firefox.
● …There are other codenames like “Trident” and “Chakra” for different versions of IE,
“ChakraCore” for Microsoft Edge, “Nitro” and “SquirrelFish” for Safari, etc.

The terms above are good to remember because they are used in developer articles on the
internet. We’ll use them too. For instance, if “a feature X is supported by V8”, then it probably
works in Chrome and Opera.
 How do engines work?
Engines are complicated. But the basics are easy.

1. The engine (embedded if it’s a browser) reads (“parses”) the script.


2. Then it converts (“compiles”) the script to the machine language.
3. And then the machine code runs, pretty fast.

The engine applies optimizations at each step of the process. It even watches the compiled
script as it runs, analyzes the data that flows through it, and applies optimizations to the
machine code based on that knowledge. When it’s done, scripts run quite fast.

What can in-browser JavaScript do?

Modern JavaScript is a “safe” programming language. It does not provide low-level access to
memory or CPU, because it was initially created for browsers which do not require it.

JavaScript’s capabilities greatly depend on the environment it’s running in. For instance,
Node.js  supports functions that allow JavaScript to read/write arbitrary files, perform network
requests, etc.

In-browser JavaScript can do everything related to webpage manipulation, interaction with the
user, and the webserver.

For instance, in-browser JavaScript is able to:


● Add new HTML to the page, change the existing content, modify styles.
● React to user actions, run on mouse clicks, pointer movements, key presses.

Send requests over the network to remote servers, download and upload files (so-called
AJAX  and COMET  technologies).

Get and set cookies, ask questions to the visitor, show messages.

Remember the data on the client-side (“local storage”).

What CAN’T in-browser JavaScript do?

JavaScript’s abilities in the browser are limited for the sake of the user’s safety. The aim is to
prevent an evil webpage from accessing private information or harming the user’s data.
Examples of such restrictions include:
● JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or
execute programs. It has no direct access to OS system functions.

Modern browsers allow it to work with files, but the access is limited and only provided if the
user does certain actions, like “dropping” a file into a browser window or selecting it via an
<input> tag.

There are ways to interact with camera/microphone and other devices, but they require a
user’s explicit permission. So a JavaScript-enabled page may not sneakily enable a web-
camera, observe the surroundings and send the information to the NSA  .
● Different tabs/windows generally do not know about each other. Sometimes they do, for
example when one window uses JavaScript to open the other one. But even in this case,
JavaScript from one page may not access the other if they come from different sites (from a
different domain, protocol or port).
This is called the “Same Origin Policy”. To work around that, both pages must agree for data
exchange and contain a special JavaScript code that handles it. We’ll cover that in the
tutorial.
This limitation is, again, for the user’s safety. A page from http://anysite.com which a
user has opened must not be able to access another browser tab with the URL
http://gmail.com and steal information from there.
● JavaScript can easily communicate over the net to the server where the current page came
from. But its ability to receive data from other sites/domains is crippled. Though possible, it
requires explicit agreement (expressed in HTTP headers) from the remote side. Once again,
that’s a safety limitation.

Such limits do not exist if JavaScript is used outside of the browser, for example on a server.
Modern browsers also allow plugin/extensions which may ask for extended permissions.

What makes JavaScript unique?

There are at least three great things about JavaScript:

● Full integration with HTML/CSS.



Simple things are done simply.

Support by all major browsers and enabled by default.
JavaScript is the only browser technology that combines these three things.

That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating
browser interfaces.

While planning to learn a new technology, it’s beneficial to check its perspectives. So let’s move
on to the modern trends affecting it, including new languages and browser abilities.

Languages “over” JavaScript

The syntax of JavaScript does not suit everyone’s needs. Different people want different
features.

That’s to be expected, because projects and requirements are different for everyone.

So recently a plethora of new languages appeared, which are transpiled (converted) to


JavaScript before they run in the browser.

Modern tools make the transpilation very fast and transparent, actually allowing developers to
code in another language and auto-converting it “under the hood”.

Examples of such languages:


● CoffeeScript  is a “syntactic sugar” for JavaScript. It introduces shorter syntax, allowing us
to write clearer and more precise code. Usually, Ruby devs like it.
● TypeScript  is concentrated on adding “strict data typing” to simplify the development and
support of complex systems. It is developed by Microsoft.

Flow  also adds data typing, but in a different way. Developed by Facebook.

Dart  is a standalone language that has its own engine that runs in non-browser
environments (like mobile apps), but also can be transpiled to JavaScript. Developed by
Google.

There are more. Of course, even if we use one of transpiled languages, we should also know
JavaScript to really understand what we’re doing.

Summary
● JavaScript was initially created as a browser-only language, but is now used in many other
environments as well.

Today, JavaScript has a unique position as the most widely-adopted browser language with
full integration with HTML/CSS.
● There are many languages that get “transpiled” to JavaScript and provide certain features. It
is recommended to take a look at them, at least briefly, after mastering JavaScript.

Manuals and specifications


This book is a tutorial. It aims to help you gradually learn the language. But once you’re familiar
with the basics, you’ll need other sources.

Specification
The ECMA-262 specification contains the most in-depth, detailed and formalized information
about JavaScript. It defines the language.

But being that formalized, it’s difficult to understand at first. So if you need the most trustworthy
source of information about the language details, the specification is the right place. But it’s not
for everyday use.

The latest draft is at https://tc39.es/ecma262/  .

To read about new bleeding-edge features, that are “almost standard”, see proposals at
https://github.com/tc39/proposals  .

Also, if you’re in developing for the browser, then there are other specs covered in the second
part of the tutorial.

Manuals
● MDN (Mozilla) JavaScript Reference is a manual with examples and other information. It’s
great to get in-depth information about individual language functions, methods etc.

One can find it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference  .

Although, it’s often best to use an internet search instead. Just use “MDN [term]” in the query,
e.g. https://google.com/search?q=MDN+parseInt  to search for parseInt function.

MSDN – Microsoft manual with a lot of information, including JavaScript (often referrerd to as
JScript). If one needs something specific to Internet Explorer, better go there:
http://msdn.microsoft.com/  .

Also, we can use an internet search with phrases such as “RegExp MSDN” or “RegExp
MSDN jscript”.

Feature support

JavaScript is a developing language, new features get added regularly.

To see their support among browser-based and other engines, see:


● http://caniuse.com  – per-feature tables of support, e.g. to see which engines support
modern cryptography functions: http://caniuse.com/#feat=cryptography  .
● https://kangax.github.io/compat-table  – a table with language features and engines that
support those or don’t support.

All these resources are useful in real-life development, as they contain valuable information
about language details, their support etc.

Please remember them (or this page) for the cases when you need in-depth information about a
particular feature.

Code editors
A code editor is the place where programmers spend most of their time.
There are two main types of code editors: IDEs and lightweight editors. Many people use one
tool of each type.

IDE

The term IDE  (Integrated Development Environment) refers to a powerful editor with many
features that usually operates on a “whole project.” As the name suggests, it’s not just an editor,
but a full-scale “development environment.”

An IDE loads the project (which can be many files), allows navigation between files, provides
autocompletion based on the whole project (not just the open file), and integrates with a version
management system (like git  ), a testing environment, and other “project-level” stuff.

If you haven’t selected an IDE yet, consider the following options:


● Visual Studio Code  (cross-platform, free).

WebStorm  (cross-platform, paid).

For Windows, there’s also “Visual Studio”, not to be confused with “Visual Studio Code”. “Visual
Studio” is a paid and mighty Windows-only editor, well-suited for the .NET platform. It’s also
good at JavaScript. There’s also a free version Visual Studio Community  .

Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a
qualified developer’s salary, so just choose the best one for you.

Lightweight editors

“Lightweight editors” are not as powerful as IDEs, but they’re fast, elegant and simple.

They are mainly used to open and edit a file instantly.

The main difference between a “lightweight editor” and an “IDE” is that an IDE works on a
project-level, so it loads much more data on start, analyzes the project structure if needed and
so on. A lightweight editor is much faster if we need only one file.

In practice, lightweight editors may have a lot of plugins including directory-level syntax
analyzers and autocompleters, so there’s no strict border between a lightweight editor and an
IDE.

The following options deserve your attention:



Atom  (cross-platform, free).

Sublime Text  (cross-platform, shareware).

Notepad++  (Windows, free).

Vim  and Emacs  are also cool if you know how to use them.

Let’s not argue

The editors in the lists above are those that either I or my friends whom I consider good
developers have been using for a long time and are happy with.

There are other great editors in our big world. Please choose the one you like the most.
The choice of an editor, like any other tool, is individual and depends on your projects, habits,
and personal preferences.

Developer console
Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are
absolutely going to make errors, at least if you’re a human, not a robot  .

But in the browser, users don’t see errors by default. So, if something goes wrong in the script,
we won’t see what’s broken and can’t fix it.

To see errors and get a lot of other useful information about scripts, “developer tools” have been
embedded in browsers.

Most developers lean towards Chrome or Firefox for development because those browsers
have the best developer tools. Other browsers also provide developer tools, sometimes with
special features, but are usually playing “catch-up” to Chrome or Firefox. So most developers
have a “favorite” browser and switch to others if a problem is browser-specific.

Developer tools are potent; they have many features. To start, we’ll learn how to open them,
look at errors, and run JavaScript commands.

Google Chrome

Open the page bug.html.

There’s an error in the JavaScript code on it. It’s hidden from a regular visitor’s eyes, so let’s
open developer tools to see it.
Press F12 or, if you’re on Mac, then Cmd+Opt+J .

The developer tools will open on the Console tab by default.

It looks somewhat like this:

The exact look of developer tools depends on your version of Chrome. It changes from time to
time but should be similar.

Here we can see the red-colored error message. In this case, the script contains an unknown
“lalala” command.

On the right, there is a clickable link to the source bug.html:12 with the line number
where the error has occurred.
Below the error message, there is a blue > symbol. It marks a “command line” where we can
type JavaScript commands. Press Enter to run them ( Shift+Enter to input multi-line
commands).

Now we can see errors, and that’s enough for a start. We’ll come back to developer tools later
and cover debugging more in-depth in the chapter Debugging in Chrome.

Firefox, Edge, and others

Most other browsers use F12 to open developer tools.

The look & feel of them is quite similar. Once you know how to use one of these tools (you can
start with Chrome), you can easily switch to another.

Safari

Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to
enable the “Develop menu” first.

Open Preferences and go to the “Advanced” pane. There’s a checkbox at the bottom:

Now Cmd+Opt+C can toggle the console. Also, note that the new top menu item named
“Develop” has appeared. It has many commands and options.

Multi-line input

Usually, when we put a line of code into the console, and then press Enter , it executes.

To insert multiple lines, press Shift+Enter .

Summary

Developer tools allow us to see errors, run commands, examine variables, and much more.
● They can be opened with F12 for most browsers on Windows. Chrome for Mac needs
Cmd+Opt+J , Safari: Cmd+Opt+C (need to enable first).

Now we have the environment ready. In the next section, we’ll get down to JavaScript.

JavaScript Fundamentals
Let’s learn the fundamentals of script building.

Hello, world!
This part of the tutorial is about core JavaScript, the language itself. Later on, you’ll learn about
Node.js and other platforms that use it.

But we need a working environment to run our scripts and, since this book is online, the
browser is a good choice. We’ll keep the amount of browser-specific commands (like alert )
to a minimum so that you don’t spend time on them if you plan to concentrate on another
environment (like Node.js). We’ll focus on JavaScript in the browser in the next part of the
tutorial.
So first, let’s see how we attach a script to a webpage. For server-side environments (like
Node.js), you can execute the script with a command like "node my.js" .

The “script” tag

JavaScript programs can be inserted into any part of an HTML document with the help of the
<script> tag.

For instance:

<!DOCTYPE HTML>
<html>

<body>

<p>Before the script...</p>

<script>
alert( 'Hello, world!' );
</script>

<p>...After the script.</p>

</body>

</html>

The <script> tag contains JavaScript code which is automatically executed when the
browser processes the tag.

Modern markup
The <script> tag has a few attributes that are rarely used nowadays but can still be found in
old code:

The type attribute: <script type=…>


The old HTML standard, HTML4, required a script to have a type . Usually it was
type="text/javascript" . It’s not required anymore. Also, the modern HTML standard,
HTML5, totally changed the meaning of this attribute. Now, it can be used for JavaScript
modules. But that’s an advanced topic; we’ll talk about modules in another part of the tutorial.

The language attribute: <script language=…>


This attribute was meant to show the language of the script. This attribute no longer makes
sense because JavaScript is the default language. There is no need to use it.

Comments before and after scripts.


In really ancient books and guides, you may find comments inside <script> tags, like this:

<script type="text/javascript"><!--
...
//--></script>

This trick isn’t used in modern JavaScript. These comments hid JavaScript code from old
browsers that didn’t know how to process the <script> tag. Since browsers released in the
last 15 years don’t have this issue, this kind of comment can help you identify really old code.

External scripts

If we have a lot of JavaScript code, we can put it into a separate file.

Script files are attached to HTML with the src attribute:

<script src="/path/to/script.js"></script>

Here, /path/to/script.js is an absolute path to the script file (from the site root).

You can also provide a relative path from the current page. For instance, src="script.js"
would mean a file "script.js" in the current folder.

We can give a full URL as well. For instance:

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>

To attach several scripts, use multiple tags:

<script src="/js/script1.js"></script>
<script src="/js/script2.js"></script>

 Please note:
As a rule, only the simplest scripts are put into HTML. More complex ones reside in
separate files.
The benefit of a separate file is that the browser will download it and store it in its cache  .

Other pages that reference the same script will take it from the cache instead of
downloading it, so the file is actually downloaded only once.
That reduces traffic and makes pages faster.

⚠ If src is set, the script content is ignored.

A single <script> tag can’t have both the src attribute and code inside.

This won’t work:

<script src="file.js">
alert(1); // the content is ignored, because src is set
</script>

We must choose either an external <script src="…"> or a regular <script> with


code.

The example above can be split into two scripts to work:

<script src="file.js"></script>
<script>
alert(1);
</script>

Summary
● We can use a <script> tag to add JavaScript code to a page.
● The type and language attributes are not required.

A script in an external file can be inserted with <script src="path/to/script.js">
</script> .

There is much more to learn about browser scripts and their interaction with the webpage. But
let’s keep in mind that this part of the tutorial is devoted to the JavaScript language, so we
shouldn’t distract ourselves with browser-specific implementations of it. We’ll be using the
browser as a way to run JavaScript, which is very convenient for online reading, but only one of
many.

✔ Tasks

Show an alert
importance: 5

Create a page that shows a message “I’m JavaScript!”.

Do it in a sandbox, or on your hard drive, doesn’t matter, just ensure that it works.

Demo in new window 

To solution

Show an alert with an external script


importance: 5

Take the solution of the previous task Show an alert. Modify it by extracting the script content
into an external file alert.js , residing in the same folder.

Open the page, ensure that the alert works.

To solution

Code structure
The first thing we’ll study is the building blocks of code.

Statements

Statements are syntax constructs and commands that perform actions.


We’ve already seen a statement, alert('Hello, world!') , which shows the message
“Hello, world!”.

We can have as many statements in our code as we want. Statements can be separated with a
semicolon.

For example, here we split “Hello World” into two alerts:

alert('Hello'); alert('World');

Usually, statements are written on separate lines to make the code more readable:

alert('Hello');
alert('World');

Semicolons

A semicolon may be omitted in most cases when a line break exists.

This would also work:


alert('Hello')
alert('World')

Here, JavaScript interprets the line break as an “implicit” semicolon. This is called an automatic
semicolon insertion  .

In most cases, a newline implies a semicolon. But “in most cases” does not mean
“always”!
There are cases when a newline does not mean a semicolon. For example:

alert(3 +
1
+ 2);

The code outputs 6 because JavaScript does not insert semicolons here. It is intuitively
obvious that if the line ends with a plus "+" , then it is an “incomplete expression”, so the
semicolon is not required. And in this case that works as intended.
But there are situations where JavaScript “fails” to assume a semicolon where it is really
needed.
Errors which occur in such cases are quite hard to find and fix.
 An example of an error
If you’re curious to see a concrete example of such an error, check this code out:

[1, 2].forEach(alert)

No need to think about the meaning of the brackets [] and forEach yet. We’ll study
them later. For now, just remember the result of the code: it shows 1 then 2 .

Now, let’s add an alert before the code and not finish it with a semicolon:

alert("There will be an error")

[1, 2].forEach(alert)

Now if we run the code, only the first alert is shown and then we have an error!

But everything is fine again if we add a semicolon after alert :

alert("All fine now");

[1, 2].forEach(alert)

Now we have the “All fine now” message followed by 1 and 2 .

The error in the no-semicolon variant occurs because JavaScript does not assume a
semicolon before square brackets [...] .

So, because the semicolon is not auto-inserted, the code in the first example is treated as a
single statement. Here’s how the engine sees it:

alert("There will be an error")[1, 2].forEach(alert)

But it should be two separate statements, not one. Such a merging in this case is just
wrong, hence the error. This can happen in other situations.

We recommend putting semicolons between statements even if they are separated by


newlines. This rule is widely adopted by the community. Let’s note once again – it is possible to
leave out semicolons most of the time. But it’s safer – especially for a beginner – to use them.

Comments

As time goes on, programs become more and more complex. It becomes necessary to add
comments which describe what the code does and why.
Comments can be put into any place of a script. They don’t affect its execution because the
engine simply ignores them.
One-line comments start with two forward slash characters // .

The rest of the line is a comment. It may occupy a full line of its own or follow a statement.
Like here:

// This comment occupies a line of its own


alert('Hello');

alert('World'); // This comment follows the statement

Multiline comments start with a forward slash and an asterisk /* and end with an
asterisk and a forward slash */ .

Like this:

/* An example with two messages.


This is a multiline comment.
*/
alert('Hello');
alert('World');

The content of comments is ignored, so if we put code inside /* … */ , it won’t execute.

Sometimes it can be handy to temporarily disable a part of code:

/* Commenting out the code


alert('Hello');
*/
alert('World');

 Use hotkeys!
In most editors, a line of code can be commented out by pressing the Ctrl+/ hotkey for a
single-line comment and something like Ctrl+Shift+/ – for multiline comments (select a
piece of code and press the hotkey). For Mac, try Cmd instead of Ctrl .

⚠ Nested comments are not supported!


There may not be /*...*/ inside another /*...*/ .

Such code will die with an error:

/*
/* nested comment ?!? */
*/
alert( 'World' );
Please, don’t hesitate to comment your code.
Comments increase the overall code footprint, but that’s not a problem at all. There are many
tools which minify code before publishing to a production server. They remove comments, so
they don’t appear in the working scripts. Therefore, comments do not have negative effects on
production at all.
Later in the tutorial there will be a chapter Code quality that also explains how to write better
comments.

The modern mode, "use strict"


For a long time, JavaScript evolved without compatibility issues. New features were added to
the language while old functionality didn’t change.
That had the benefit of never breaking existing code. But the downside was that any mistake or
an imperfect decision made by JavaScript’s creators got stuck in the language forever.
This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the
language and modified some of the existing ones. To keep the old code working, most
modifications are off by default. You need to explicitly enable them with a special directive:
"use strict" .

“use strict”

The directive looks like a string: "use strict" or 'use strict' . When it is located at
the top of a script, the whole script works the “modern” way.

For example:

"use strict";

// this code works the modern way


...

We will learn functions (a way to group commands) soon.

Looking ahead, let’s just note that "use strict" can be put at the start of most kinds of
functions instead of the whole script. Doing that enables strict mode in that function only. But
usually, people use it for the whole script.
⚠ Ensure that “use strict” is at the top
Please make sure that "use strict" is at the top of your scripts, otherwise strict mode
may not be enabled.

Strict mode isn’t enabled here:

alert("some code");
// "use strict" below is ignored--it must be at the top

"use strict";

// strict mode is not activated

Only comments may appear above "use strict" .

⚠ There’s no way to cancel use strict


There is no directive like "no use strict" that reverts the engine to old behavior.

Once we enter strict mode, there’s no return.

Browser console

For the future, when you use a browser console to test features, please note that it doesn’t use
strict by default.

Sometimes, when use strict makes a difference, you’ll get incorrect results.

You can try to press Shift+Enter to input multiple lines, and put use strict on top, like
this:

'use strict'; <Shift+Enter for a newline>


// ...your code
<Enter to run>

It works in most browsers, namely Firefox and Chrome.

If it doesn’t, the most reliable way to ensure use strict would be to input the code into
console like this:

(function() {
'use strict';

// ...your code...
})()

Always “use strict”


We have yet to cover the differences between strict mode and the “default” mode.
In the next chapters, as we learn language features, we’ll note the differences between the strict
and default modes. Luckily, there aren’t many and they actually make our lives better.
For now, it’s enough to know about it in general:

1. The "use strict" directive switches the engine to the “modern” mode, changing the
behavior of some built-in features. We’ll see the details later in the tutorial.
2. Strict mode is enabled by placing "use strict" at the top of a script or function. Several
language features, like “classes” and “modules”, enable strict mode automatically.
3. Strict mode is supported by all modern browsers.
4. We recommended always starting scripts with "use strict" . All examples in this tutorial
assume strict mode unless (very rarely) specified otherwise.

Variables
Most of the time, a JavaScript application needs to work with information. Here are two
examples:
1. An online shop – the information might include goods being sold and a shopping cart.
2. A chat application – the information might include users, messages, and much more.

Variables are used to store this information.

A variable

A variable  is a “named storage” for data. We can use variables to store goodies, visitors, and
other data.

To create a variable in JavaScript, use the let keyword.

The statement below creates (in other words: declares or defines) a variable with the name
“message”:

let message;

Now, we can put some data into it by using the assignment operator = :

let message;

message = 'Hello'; // store the string

The string is now saved into the memory area associated with the variable. We can access it
using the variable name:

let message;
message = 'Hello!';
alert(message); // shows the variable content

To be concise, we can combine the variable declaration and assignment into a single line:

let message = 'Hello!'; // define the variable and assign the value

alert(message); // Hello!

We can also declare multiple variables in one line:

let user = 'John', age = 25, message = 'Hello';

That might seem shorter, but we don’t recommend it. For the sake of better readability, please
use a single line per variable.

The multiline variant is a bit longer, but easier to read:

let user = 'John';


let age = 25;
let message = 'Hello';

Some people also define multiple variables in this multiline style:

let user = 'John',


age = 25,
message = 'Hello';

…Or even in the “comma-first” style:

let user = 'John'


, age = 25
, message = 'Hello';

Technically, all these variants do the same thing. So, it’s a matter of personal taste and
aesthetics.
 var instead of let
In older scripts, you may also find another keyword: var instead of let :

var message = 'Hello';

The var keyword is almost the same as let . It also declares a variable, but in a slightly
different, “old-school” way.

There are subtle differences between let and var , but they do not matter for us yet.
We’ll cover them in detail in the chapter The old "var".

A real-life analogy

We can easily grasp the concept of a “variable” if we imagine it as a “box” for data, with a
uniquely-named sticker on it.

For instance, the variable message can be imagined as a box labeled "message" with the
value "Hello!" in it:

We can put any value in the box.


We can also change it as many times as we want:

let message;

message = 'Hello!';

message = 'World!'; // value changed

alert(message);

When the value is changed, the old data is removed from the variable:

We can also declare two variables and copy data from one into the other.
let hello = 'Hello world!';

let message;

// copy 'Hello world' from hello into message


message = hello;

// now two variables hold the same data


alert(hello); // Hello world!
alert(message); // Hello world!

 Functional languages
It’s interesting to note that there exist functional  programming languages, like Scala 
or Erlang  that forbid changing variable values.

In such languages, once the value is stored “in the box”, it’s there forever. If we need to
store something else, the language forces us to create a new box (declare a new variable).
We can’t reuse the old one.
Though it may seem a little odd at first sight, these languages are quite capable of serious
development. More than that, there are areas like parallel computations where this limitation
confers certain benefits. Studying such a language (even if you’re not planning to use it
soon) is recommended to broaden the mind.

Variable naming

There are two limitations on variable names in JavaScript:

1. The name must contain only letters, digits, or the symbols $ and _ .
2. The first character must not be a digit.

Examples of valid names:

let userName;
let test123;

When the name contains multiple words, camelCase  is commonly used. That is: words go
one after another, each word except first starting with a capital letter: myVeryLongName .

What’s interesting – the dollar sign '$' and the underscore '_' can also be used in names.
They are regular symbols, just like letters, without any special meaning.

These names are valid:

let $ = 1; // declared a variable with the name "$"


let _ = 2; // and now a variable with the name "_"

alert($ + _); // 3
Examples of incorrect variable names:

let 1a; // cannot start with a digit

let my-name; // hyphens '-' aren't allowed in the name

 Case matters
Variables named apple and AppLE are two different variables.

 Non-Latin letters are allowed, but not recommended


It is possible to use any language, including cyrillic letters or even hieroglyphs, like this:

let имя = '...';


let 我 = '...';

Technically, there is no error here, such names are allowed, but there is an international
tradition to use English in variable names. Even if we’re writing a small script, it may have a
long life ahead. People from other countries may need to read it some time.

⚠ Reserved names
There is a list of reserved words  , which cannot be used as variable names because they
are used by the language itself.

For example: let , class , return , and function are reserved.

The code below gives a syntax error:

let let = 5; // can't name a variable "let", error!


let return = 5; // also can't name it "return", error!
⚠ An assignment without use strict
Normally, we need to define a variable before using it. But in the old times, it was technically
possible to create a variable by a mere assignment of the value without using let . This
still works now if we don’t put use strict in our scripts to maintain compatibility with old
scripts.

// note: no "use strict" in this example

num = 5; // the variable "num" is created if it didn't exist

alert(num); // 5

This is a bad practice and would cause an error in strict mode:

"use strict";

num = 5; // error: num is not defined

Constants

To declare a constant (unchanging) variable, use const instead of let :

const myBirthday = '18.04.1982';

Variables declared using const are called “constants”. They cannot be changed. An attempt
to do so would cause an error:

const myBirthday = '18.04.1982';

myBirthday = '01.01.2001'; // error, can't reassign the constant!

When a programmer is sure that a variable will never change, they can declare it with const
to guarantee and clearly communicate that fact to everyone.

Uppercase constants
There is a widespread practice to use constants as aliases for difficult-to-remember values that
are known prior to execution.

Such constants are named using capital letters and underscores.

For instance, let’s make constants for colors in so-called “web” (hexadecimal) format:

const COLOR_RED = "#F00";


const COLOR_GREEN = "#0F0";
const COLOR_BLUE = "#00F";
const COLOR_ORANGE = "#FF7F00";

// ...when we need to pick a color


let color = COLOR_ORANGE;
alert(color); // #FF7F00

Benefits:

COLOR_ORANGE is much easier to remember than "#FF7F00" .
● It is much easier to mistype "#FF7F00" than COLOR_ORANGE .

When reading the code, COLOR_ORANGE is much more meaningful than #FF7F00 .

When should we use capitals for a constant and when should we name it normally? Let’s make
that clear.
Being a “constant” just means that a variable’s value never changes. But there are constants
that are known prior to execution (like a hexadecimal value for red) and there are constants that
are calculated in run-time, during the execution, but do not change after their initial assignment.

For instance:

const pageLoadTime = /* time taken by a webpage to load */;

The value of pageLoadTime is not known prior to the page load, so it’s named normally. But
it’s still a constant because it doesn’t change after assignment.

In other words, capital-named constants are only used as aliases for “hard-coded” values.

Name things right

Talking about variables, there’s one more extremely important thing.


A variable name should have a clean, obvious meaning, describe the data that it stores.

Variable naming is one of the most important and complex skills in programming. A quick
glance at variable names can reveal which code was written by a beginner versus an
experienced developer.
In a real project, most of the time is spent modifying and extending an existing code base rather
than writing something completely separate from scratch. When we return to some code after
doing something else for a while, it’s much easier to find information that is well-labeled. Or, in
other words, when the variables have good names.

Please spend time thinking about the right name for a variable before declaring it. Doing so will
repay you handsomely.

Some good-to-follow rules are:



Use human-readable names like userName or shoppingCart .

Stay away from abbreviations or short names like a , b , c , unless you really know what
you’re doing.
● Make names maximally descriptive and concise. Examples of bad names are data and
value . Such names say nothing. It’s only okay to use them if the context of the code makes
it exceptionally obvious which data or value the variable is referencing.
● Agree on terms within your team and in your own mind. If a site visitor is called a “user” then
we should name related variables currentUser or newUser instead of
currentVisitor or newManInTown .

Sounds simple? Indeed it is, but creating descriptive and concise variable names in practice is
not. Go for it.

 Reuse or create?
And the last note. There are some lazy programmers who, instead of declaring new
variables, tend to reuse existing ones.

As a result, their variables are like boxes into which people throw different things without
changing their stickers. What’s inside the box now? Who knows? We need to come closer
and check.
Such programmers save a little bit on variable declaration but lose ten times more on
debugging.

An extra variable is good, not evil.

Modern JavaScript minifiers and browsers optimize code well enough, so it won’t create
performance issues. Using different variables for different values can even help the engine
optimize your code.

Summary

We can declare variables to store data by using the var , let , or const keywords.
● let – is a modern variable declaration. The code must be in strict mode to use let in
Chrome (V8).
● var – is an old-school variable declaration. Normally we don’t use it at all, but we’ll cover
subtle differences from let in the chapter The old "var", just in case you need them.

const – is like let , but the value of the variable can’t be changed.

Variables should be named in a way that allows us to easily understand what’s inside them.

✔ Tasks

Working with variables


importance: 2

1. Declare two variables: admin and name .


2. Assign the value "John" to name .
3. Copy the value from name to admin .
4. Show the value of admin using alert (must output “John”).
Exploring the Variety of Random
Documents with Different Content
"Why, my children, is it possible?" cried Mademoiselle, putting a
hand on the shoulder of each, and looking them full in the face with
a smile. "You are afraid, I see, to introduce me to your father's
weavers. You are afraid to tell nurse that you have done so, because
poor nurse is jealous of the French gentleman, and his little French
sister. Is it not so?"
The girls seemed about to cry. Mademoiselle went on,
"You shall request your father to introduce me to a florist or two.
Meantime, we will ask my brother whether there are such among
those whom he employs. My girls, we are of one country now,--you
and I. Why should there be any tormenting, unworthy jealousy? Tell
me why."
Charlotte only knew that some people thought,--some people
feared,--it seemed so very natural that manufacturers should get the
best weavers from one another.
"So very natural!" exclaimed Mademoiselle. "I tell you, my girl,
that my brother has it not in his nature to feel jealousy of a
neighbour; and I tell you also that my brother will in time give good
weavers to your father and to all of the same occupation in this
neighbourhood. If the suspicion you speak of were natural, it would
be for my brother to feel it; yet, I will take you among his men
without fear, if we find that they have tulips and auriculas."
Before Charlotte had quite ventured to look again in
Mademoiselle's face, M. Gaubion came in, and gave her the address
of several of his men who were as fond of flowers as herself. When
she gaily asked him if he was afraid of the Miss Culvers being
admitted to intercourse with persons who were working for him, he
smiled and added the address of a woman who was weaving velvet
of a particularly curious pattern, which he thought the young ladies
might like to see. This woman might have auriculas too, for aught M.
Gaubion knew; and the party set out to ascertain the point.
Mrs. Ellis was found at her loom, and overheard to be scolding
lustily till her visitors popped their heads through the gap by which
the stairs opened into the room. Her natural tone of voice was not
immediately recoverable, and she spoke in something between a
whine and a scream, which suited ill with the languid air with which
she hung her head aside, and fumbled with the gilt locket which
hung by a worn hair-chain round her neck. She had so much the
appearance of an actress of the lowest grade, that Mademoiselle
thought there could be no mistake in conjecturing that she had not
always pursued her present occupation, nor offence in asking how
the confinement suited her health. She had sat at the loom, she
said, since she was the age of that boy,--pointing to a lad who had
evidently been the object of her wrath. Not that she had had work
all that time. O, no! She had suffered her share from want of work.
Indeed, it was hard to tell which was worst for the health;--the load
on the spirits of having no work, or the fatigue of weaving. If the
ladies would believe her, it was a killing occupation. It sat very hard
upon her stomach, and her heart turned half round; and her lungs,--
O, if they knew what lungs she had!
"You let us know that before we came up to see you," observed
Mademoiselle. "If you think your lungs weak, is it not a pity that you
should exert them as you did just now? And, this minute, you spoke
much louder than we need trouble you to do."
"Ah! ma'am, 'tis the way with my voice. When it once gets up, I
can't, somehow, get it down again."
The boy at the loom confirmed this by a sidelong look of great
meaning. His mother sighed so as to show a fine remaining capacity
of lung, and was about to proceed about her infirm head, and a
weak ancle that she had had all her life, when her visitors turned the
current of her complaints upon the times. Poor wages! very poor
wages! and hard work. It was a bad sort of employment.
"Why, then, do you bring up your children to it? Here are five
looms in this room."
"Yes, ma'am; but only three for my own family. My eldest girl is a
filler. Those two farther looms are let to neighbours."
"And both with work in them, I see. This seems a pretty piece of
black silk that your boy is about; and he seems to be doing his work
well."
"Pretty well, ma'am: pretty well, for the time. I thank the Almighty,
Tom is a middling boy."
The little lad had all the appearance of being better than a
middling boy. He worked with might and main while the ladies stood
by, shouting the shortest possible answers to their questions, amidst
the noise of his machine. His mother gave him a smart rap on the
head, and asked him where his manners were, to go on with his
weaving while the ladies spoke to him. His looks conveyed his
apprehension that he should have been equally found fault with if he
had quitted his grasp of his shuttle without leave. He now related
that he was twelve years old, had learned to weave three weeks,
and had in that time woven sixteen yards, for which he was to have
sixpence a-yard. The ladies thought that, in relation to him, his
mother's voice ought to be made to come down again, to whatever
pitch it might have risen.
"And whose work is this?" asked Charlotte, examining a piece of
slight French-white silk, carelessly covered with a brown-looking
cloth.
"That's Peggy's," replied Tom. "She has left it for to-night, to make
the beds."
The girls had observed, as they mounted the stairs, that though
there was a green baize on the floor of the room below, a handsome
mahogany chest of drawers, a tea-tray with a tiger upon it, and
above it two fine pictures,--viz., the Duke of Wellington staring
mightily upon his companion, a Madonna, as if meditating war
against her child--though all these things testified to the means of
comfort being in the house, there existed the deplorable discomfort
of unmade beds late in the evening. A curl-papered girl, with a face
grimed with dust from her loom, was lazily undrawing the curtains,
and about to let in the fresh air for the first time that day.
Mademoiselle did not know much about how far money went in this
country; but she consulted with Charlotte as to whether the times
ought to be called very bad by a family who earned respectively,
three, five, ten, and twenty shillings a-week, besides letting two
looms at three shillings per week each. Charlotte thought they must
be so well off that it would be worth while to spare the second girl
from her loom, and give her time to take her hair out of the paper
with which it bristled, to make the beds in the cool air of the
morning, to new paper the staircase, where tatters hung to gather
the dust, revealing the most snug mouse-holes possible; to brush
the green baize, polish the tiger, and dust the Duke of Wellington;
and, finally, to purify the atmosphere of the weaving-room, by
certain appliances which seemed at present not to be dreamed of.
But Mrs. Ellis appeared to think that it would be time enough to
clean when days of adversity should come.
She resumed her curious velvet weaving, that the young ladies
might observe the action of the machinery; in the course of which
investigation Adèle was sensible of a descent of dust into her mouth
as she looked up, and Lucy's cheek was tickled by a floating cobweb.
Seeing the one make a grimace, and the other rub her cheek
indignantly, Charlotte asked Mrs. Ellis how often she whitewashed.
The lady with the locket smiled at the simplicity of such a question,
addressed to a weaver; and when asked whether dust did not injure
her work, she reached out her hand for a brush which lay near, gave
one stroke with a skilful flourish, and looked with a triumphant face
through the cloud she had just raised, as if to say, "You see!" Part of
the gesture was, however, lost upon her visitors; for Mademoiselle
had run to the window on the first hint of what was going to
happen; Charlotte was coughing; and Lucy and Adèle had their
hands before their faces.
Mademoiselle returned, after awhile, to suggest a modest doubt
whether it was not better to be without dust, than to brush it from
one place that it might fall upon another--into Mrs. Ellis's weak
lungs, among other receptacles; but Mrs. Ellis seemed to agree with
old Short, that a loom would be nothing without cobwebs; and all
that remained, therefore, was to ask about the auriculas.
Tom brightened up at the word. The poor lad had none to show at
home; for his mother had no idea of sparing him time enough to
make any use of the small patch of soil behind the house, which
presented a fine study of cabbage-stalks and broken crockery to any
painter who might happen to be passing by the back lane. But
Cooper lived at hand; and Cooper happened to like auriculas, and to
think Tom something more than "a middling boy;" and he
encouraged him to come at spare minutes, and watch the progress
of his friend's gardening; and, moreover, allowed him a corner in
which to set a root or two of his own. At the first sign of permission
from his mother, Tom now pulled down his wristbands, flung on his
coat, and stood, cap in hand, to show the ladies the way.
It was not till the Miss Culvers drew one another's attention to old
Short, as his grizzled head was seen from the garden to be moving
in his loom, that it occurred to Mademoiselle that she might be
trespassing on the premises of their father's weavers, after all. Next
popped up at the window the round face of Ichabod, kissing the
palm of his hand as he saw his father, though Charlotte flattered
herself that this act of courtesy was intended in answer to her nod.
"O dear!" said Mademoiselle, "we are in a forbidden place. Come,
Charlotte, come and hear that I am not begging to know any secrets
about weaving, but only about flowers: and, Lucy, do you keep
beside Adèle; and if she asks any questions that nurse would not
like, tell me."
Cooper laughed, and said that he was the one to learn, instead of
communicating secrets to French manufacturers; and Miss Charlotte
need not fear his leaving her father's service, as he had told his wife,
but a little time ago, that Mr. Culver had been a good master to him,
and he was determined to work for him still, if all the foreigners in
the world came to settle near. He explained that he meant no
incivility by this, offering the choice of some fine roots to
Mademoiselle, giving her advice as to the cultivation of them, and
inviting her to come whenever she liked to consult him on this
matter of mutual taste.
"How is it," asked Mademoiselle, smiling, "that you will treat a
foreigner, as to flowers, as if she was an Englishwoman? Do you
forget that I am French, that you thus offer me the choice of your
tulips?"
Cooper replied that God had made flowers to grow in all parts of
the world as a common possession; and that for people to be
jealous of one another's methods of cultivation was a meanness that
he, for one, would be ashamed of. He knew that a neighbour of his
had wrung off the head of a pigeon of a rare kind, that he might be
master of the only pair of that kind in existence; but this was, in his
opinion, making sport of God's works, and encouraging bad feelings
towards men, in a way which was irreligious, if anything was. If he
saw a party of his neighbours' children in the fields, one taking
possession of all the violets, and another of all the primroses, and a
third of all the buttercups, and preventing those to whom only
daisies were left from having any benefit of what God's hand had
scattered for all, he should get his bible, and show them plenty of
sayings in it which should make them ashamed of themselves.
"And why not so, likewise, with that which is produced by man?"
inquired the lady. "Are not the faculties of man roots from which
proceed designs; and are not the fruits of those designs as clearly
given for common use in the end as the blossoms which are
scattered over the fields and meadows? Let him that gathers call
them his; but let him be free to impart when he meets with another
who also desires to impart,--free from the interference of authority--
free from the envious remarks of those who look on; and if one has
more skill than another, let them learn of one another."
"To be sure, madam: just as I am willing to show you my method
with my tulips."
"And as my brother is willing to improve your silk manufacture.
But you will not learn what he has to teach, because he is a
foreigner."
Cooper was willing enough to learn as much as he could find out
by examining what was wrought in the Frenchman's loom; but
working for him, when English masters were to be had, was
altogether a different thing.
One would think, Mademoiselle observed, that God had made the
flowers of the field, and that man had made himself, by the
distinction thus set up between those possessions which were
allowed to be given for the good of all, and those which were
proposed to be kept for selfish purposes. Clothing of silk was as
much furnished by Providence as the raiment of the field-lilies; and
to forbid the transference of the one or the other is to oppress both
those who would transfer and those who would receive: it was to
condemn violet-gatherers to have nothing but violets, and primrose-
lovers to grow tired of primroses; while they would have been made
perfectly happy by the mixed garland, whose materials were all
within their reach.
Cooper observed that his little Ichabod had grown tired of
buttercups lately, and had got the habit of throwing them out of the
window. It was sometimes difficult to amuse so young a child, who
had no companions at home. He often thought of taking him to the
infant school, where the little ones had sham gardens, which it was
pretty to look at.
"Let your child carry his lap full of buttercups," replied
Mademoiselle, "and he will exchange them readily for things which
he will not throw out of the window; and from this infant traffic we
will go and take a lesson in mutual confidence and mutual help."
Chapter III.

CHANCE CUSTOMERS.

Nurse Nicholas had met with so much sympathy and kindness


from everybody about her since the day when her misfortune was
made known to her, that she excited, at length, something like envy
in the inferior servants of Mr. Culver's family. They had, at first,
offered to make up her mourning for her, and to take the entire
charge of the children for a few days, that she might have leisure to
grieve alone; and they were making slops, or mixing brandy-and-
water for her all day long for the first week,--thinking indulgence a
very consoling thing, whether earned by illness of body or pain of
mind. Moreover, they had patience with her pettishness for a longer
time than could have been expected, observing to one another that
it was certainly a very cutting thing to have an only son shot; and
that it was enough to make any temper go astray to think of
anybody that had done his best for his country being served in such
a way. In time, however, when four years had elapsed, they began
to feel that the call upon their good-nature and forbearance was
more protracted and incessant than was necessary. Nurse had really
grown so proud, that it was difficult to keep well with her; and they
were tired of seeing the very same look come over her face, and of
hearing the very same sigh, whenever there was mention of things
which must be mentioned sometimes,--people's sons, for instance,
and the sea, and tobacco, and such things. If there was any sort of
dispute, in which their master or the young ladies interfered,
everybody was sure to be blamed except nurse; and profit came out
of her misfortune in other ways, too. They wished they might ever
get into such favour with any master or mistress as to have friends
to tea as often as nurse had; and all to cry over the story of poor
Nicholas, though, to be sure, time was found to talk about plenty of
other things before the evening was over. Then, though Nicholas had
been a very good son, in respect of sending presents to his mother,
out of his pay, the gifts she now had would much more than make
up for anything she had lost from that quarter. They could not
conceive, for their parts, what she could do with her wages; they
only wished they were to expect what she must have to leave. She
really could not spend anything, except for the trifles she gave the
children on their birthdays. As sure as the year came round, her
master presented her with a black gown; and the young ladies
bought muslin handkerchiefs and mourning-caps, more than she
could use; and Mademoiselle had knitted her a pair of black mits for
Sundays, that were quite a curiosity for the knitting. O yes; it was
very well to wear mourning from year to year,--longer than she had
done for her husband. Nurse would always wear mourning now, as
well she might, though they doubted whether she would have had
much more comfort of her son, if he had lived, than now; for he
could not have been spared often from his duty, and he was always
but a poor hand at writing a letter. If a woman was to lose an only
son, it could hardly happen in an easier way than it had happened to
nurse.
In the midst of some such speculations as these, it happened that
nurse accepted a little black shawl from one of the young ladies with
unaccountable indifference. There was nothing for it but to suppose
that she was now so accustomed to presents that she thought little
of them. But on the next Sunday the matter was differently
explained. Nurse appeared in a splendid figured brocade, which had
been left her by an aunt, and never altered in the fashion, from
there being no materials wherewith to make up any part of it afresh.
By dint of a double quantity of muslin handkerchief, and of a long
and wide muslin apron, tamboured by herself when at school, the
peculiarities of the waist were in part hidden, while enough
projected on all sides to show what fine, stout fabrics our fathers
could weave. The apparition of nurse, thus attired, appeared on the
stairs time enough to allow of all the necessary speculation being
gone through before church.
"Papa, papa!" cried Lucy, flying about the house to find her father,
who was reading his Sunday paper quietly in the back parlour. "Oh,
papa!----"
"Well, my dear. But I wish you would not slam the door."
"I thought nurse was behind, and I did not want her to come in.
Oh, papa! have you seen nurse?"
"No, my dear. Is her nose growing out of the window, and over hill
and dale, like the wonderful nose in the German story that Maria
was telling me?"
"No, no! but she does look so odd in that gay gown that she used
to show us for a sight; and just after Charlotte gave her a shawl,
too,--a shawl with a border of pretty grey and white pattern, on a
black ground. She might have worn Charlotte's shawl a little first."
"She will wear it still, I dare say; and perhaps she thinks she has
been in black long enough."
Nurse now came in, with a prim and somewhat sentimental
expression of countenance, as if thinking that she ought to change
her face with her dress, and scarcely knowing how to set about it.
Her master's question soon brought back one of her accustomed
modes of looking and speaking.
"You are going out for the day, I suppose, nurse?"
"Going out, sir! where should I go to? It is for those who have
friends and relations to go out visiting; and I have none, except just
the Taylors and the Aytons, and old Mr. Martin, and Sukey Street,
and a few more. You seem to think I must be always wanting to go
out visiting, sir."
"Not at all, nurse. It was only that I saw you were dressed, and I
supposed----"
"Dressed! aye, it is time to be dressed when the very nursery-
maids make as fine a show as their mistresses did twenty years ago.
Why, there is Mrs. Mudge's nurse-maid; I curtsied to her last week,
knowing the baby, and taking the girl for Mrs. Mudge herself, as I
well might do, for she had a prettier Leghorn than ever her mistress
wore, and a slate-coloured silk, with leg of mutton sleeves. You may
rely upon it, sir, with leg of mutton sleeves, and a band the same,
buckled behind, like a young lady."
"And so you put on something gayer than a slate-coloured silk to
outdo her."
"It puts one upon one's dignity, sir, to see such ways in bits of girls
sprung up but yesterday. At this girl's age I worked hard enough, I
remember, for months together, before I got a chintz, which was
thought a great thing in my day."
"And I dare say somebody scolded you for getting it; for chintzes
cost as much then as some silks do now. I dare say somebody
scolded you, nurse."
"Why, my mistress made me wear black mittens and a white apron
with it, to show that I was a servant: which was very proper, though
I had no mind to it at the time. But as to wearing silk, except on a
pincushion, I assure you, sir, I never thought of such a thing."
"Any more than Mrs. Mudge's maid now thinks of dressing in
white satin. I dare say not, indeed; for it was as much as any but
rich mistresses could do to get silk dresses in your young days."
Nurse hoped her master was not going to object to her wearing
silk now, on Sundays and the young ladies' dancing days. When
servant-girls took upon them to wear such things as their elders
never aspired to, it was time----
"I am not going to object to your wearing silk, nurse, any more
than to the nurse-maid you speak of doing the same. The more you
both wear, the better for me."
"Aye, in the sense of your being a manufacturer; but, as the
master of a family, sir, you would judge differently."
"Not at all. If there are silk-worms enough in the world to yield silk
wherewith to dress every man, woman and child, where is the harm
of every man, woman, and child wearing silk, if it pleases them to do
so?"
"But the look of it, sir! Think of a girl dressing like her mistress!"
"It is an unfit thing when the girl has not money enough properly
to afford such a dress. But if the price falls to a point within her
reach, there is no more reason why she should not possess herself
of such an one than there would be if she had had money left her
wherewith to buy it. Her mistress will forthwith array herself in some
more expensive fabric, which, perhaps, none below duchesses had
worn till it became cheaper in proportion, as silk had done; and this
fabric will, in its turn, descend within the reach of servants, till Mrs.
Mudge's maid may, in her old age, be as much surprised at the array
of the young girls of that time as you now are at people of her rank
wearing silk."
"But, papa," objected Lucy, "what are the ladies to do all this
time? Must duchesses go on inventing expensive things to wear, or
else dress like their maids?"
"There will be always plenty of people able and willing to save the
duchesses the trouble of inventing," replied her papa. "We have not
yet seen half of what human ingenuity may do in the way of
inventing comforts and discovering beauties. If you could pop into
the world again a few hundred years hence, you might chance to
find every African between the tropics dressed in clear muslin, and
every Laplander comfortably muffled in superfine scarlet or blue
cloth."
"And what would our duchesses wear then, papa?"
"Something which we cannot guess at; and which to them would
appear more beautiful and convenient than was ever invented
before."
Nurse wondered what her master could be thinking of. Instead of
having people humble and contented with their condition, he would
have them be looking up and on continually.
"Have you seen the gipsy women lately?" inquired her master. Not
very lately, nurse replied; but she probably should soon, as a great
annual gipsy feast was to be held within the month, somewhere
near town; and no doubt the Drapers would return to their old
haunts for the occasion.
"Do you bid them be contented with their condition, living in tents,
on the damp ground, and eating animals that they find dead?"
Nurse thought her master more odd than ever. As if all respectable
people did not like to live under a roof, and have decent clothes, and
eat like Christians! She did not know that in old times, servants and
labourers who dwelled somewhat in gipsy style were desired to be
content with their condition; and that it was thought a piece of
ineffable presumption to wish to live in abodes at which beggars
would now shrug their shoulders. Mr. Culver would have people
content without what could not be had otherwise than by the
sacrifice of what is of more consequence than that which they wish
for. He was sorry to see maid-servants dressed in lace, because it is
impossible for maid-servants to buy lace without neglecting their
parents and friends, or omitting to provide themselves with a
hundred more necessary things, or with a fund for their own support
when they must cease to earn; but if lace should ever come to be as
cheap as tape, he should like to see every body wear lace that likes
it.
"O, papa!" cried Lucy, "would you like to see little Ichabod Cooper
with lace on his shirt-collar?"
"I should like to see the Coopers, and not only the Coopers, but
the poorest of the poor, in possession of every thing that is useful
and that gives pleasure. If there was enough for every body of all
that is useful and beautiful, why should not every body have it? All
would be the happier, would not they?"
"But there never could be enough of every thing for every body,
papa."
"How do you know that, my dear? I am far from being sure of that
myself."
Lucy stared, and began to think of all that she liked best;--blue
sashes, and cages of squirrels, and ice-creams, and Rosamond—
Rosamond that she hid under her pillow that she might read it
before nurse was awake in the morning. Was it possible that there
could ever be enough of all these for every body in Europe, Asia,
Africa, and America? Her papa assured her that the experiment had
never yet been tried how many of God's good gifts can be put within
the reach of God's creatures. So many have been afraid of others
possessing too much, that all have only got a very little way in
helping one another, though they have been very clever at the work
of mutual hindrance. It may be that there are pearls enough in
southern oceans to deck the whole human race; and cotton enough
on the American plains to clothe the species; and dyes enough in
the eastern woods to diversify all the habitations in the world; and
industry, and zeal, and good-will enough in men's hearts to dispose
them all to learn and to communicate whatever the wise have to
teach, and the benevolent to suggest, and the inventive to relate,
from the remotest corners of the earth. It may be that every good
book will in time be read in all countries of the globe, and then----
"And then," interrupted Lucy, "some Lapland children may read
about Rosamond's gallop down the Black Lane; and some little
people in China may be pleased at finding that she was fond of gold
and silver fish. Well, this does not seem very surprising when one
thinks how many people in America and in the East Indies know all
about Rosamond already."
"I should like to be now sending my silks as far as our good books
will travel in time," observed Mr. Culver.
"And so you will, I suppose, papa, if so many people will wear
silks as you seemed to think just now."
"Your brothers may, after me; or their sons and grandsons, after
them," replied Mr. Culver; "but it takes a long time for people to
learn to exchange freely and fairly against each other, when they
have been taught to be mutually jealous, and to fancy that if one
party gains by the exchange, the other must be a loser."
"But many more do buy silk than some time ago, papa."
"Yes, indeed," observed nurse; "when maid-servants begin, it is a
pretty good sign that silk is growing common."
"Then you will grow rich, papa. I should like you to grow rich."
Her father told her that a beginning was made by his having
ceased to grow poor. When smuggling should have ceased, and
there should have been time for the English manufacture to improve
as the French had done, he hoped he might be more in the way of
growing rich than he had ever yet been. Meanwhile, the more
people wore silks, be they servant-maids or the dames of New
Zealand, the better for him; and for them, if they felt more
complacent in silk attire than in the woollen petticoats and mantles
of matting which their respective ancestors wore.
"The Bremes dance beautifully in their blue Gros-de-Naples
frocks," Lucy observed.
"Better than you in your white, my dear? Well, if all the world is to
wear more silk, it is time you and your sisters were beginning,--I
suppose you think. Hey, Lucy?"
Nurse was in possession of the young ladies ideas on this subject,
and took the present opportunity of putting her master in possession
of them likewise, together with her own.
"Well, nurse, I have no wish that my children should go on being
envious of the Bremes a moment longer than is necessary. So, silk
frocks they shall have. I shall send you in half a piece from the
warehouse, which will do very well. If you find a few blemishes in
the warp, you can cut them out in the making, I dare say; and, but
for them, the fabric is perfectly good."
The girls were a little disappointed at not having the choice of a
colour, and alarmed at the mention of blemishes; but it was a great
thing to have gained, in any way, a point which had long been
aspired to. Nurse was much vexed that she could not have the
pleasure of making the purchase at Mr. Breme's shop, giving Mr.
Breme himself, if he should be behind the counter, all possible
trouble in suiting the tastes of her young ladies. In order not to be
wholly deprived of this satisfaction, she determined that all the
adjuncts of these pretty new dresses should be purchased there.
This settled, she and her charge were equally anxious not to delay
the business beyond the next day.
When they arrived near the shop, on the Monday morning, nurse
still resplendent in her figured brocade, they were mortified at
finding the house shut in by a scaffolding, and the narrow entrance
between the planks almost closed up by heaps of shavings and piles
of bricks. They slackened their pace to observe, and were silently
afraid that it must be too dark within for the proper transaction of
business. While pausing, they were saluted by a cloud of dust which
rose after some heavy blows behind the screen of planks, and which
did much towards convincing them that the present was hardly the
time or place for discharging their errand.
"We must come some other time," remarked Lucy to the unwilling
nurse.
"We must go somewhere else," observed Charlotte, who saw little
hope of the scaffolding being down before the next dancing-day,
beyond which it was impossible to wait for the new silk frocks.
The workmen went on knocking, sawing, and standing in the way
very unconcernedly; but a strange-looking personage peeped out
from behind the corner of the screen of planks, saying,
"Go somewhere else, ladies? Where will you meet with such a
shop as this, now being enlarged for your convenience? You will find
it light and busy enough within. I know of one good customer, at
least, that is there."
The girls thought this odd, as the man was only a poor person
who was mending a chair-bottom, in the corner formed by the
projection of the scaffolding into the street, where he could lay his
rushes beside him, and work undisturbed by the passengers, while
in full view of them. He seemed to take upon himself the office of
advertiser of Mr. Breme's concern, as he directed to the
establishment the attention of all who stopped and peeped over the
heads of the little boys who were watching his proceedings. He let
everybody know that the shop was accessible, and was now being
enlarged. Several persons lingered to see whether nurse and her
charge went in; and their safe and easy entrance, when they once
made the attempt, encouraged one or two to follow.
Charlotte looked round for the good customer spoken of by the
chair-mender, but could see no finely-dressed lady engrossing the
attention of the shop-people; no dainty gentleman pronouncing
upon such articles as he might be presumed to understand. There
was only an old woman buying nun's lace for her mob-cap; and a
young woman, with a baby in her arms, comparing remnants of
common print; and a child waiting patiently, with a hot half-penny
squeezed in her hand, for a skein of thread; and a party of gipsies in
red cloaks at the further end of the shop, with their backs turned to
the new comers. Nurse was too busy putting on her spectacles, and
holding gauze ribbons in various lights, to take any notice of what
other people were doing, till the man who was serving her leaned
over the counter to whisper that the customers yonder (nodding
towards the gipsies) were choosing a very expensive dress for their
queen to wear at the next of their festivals; and that it was to be
made up by one of the first dress-makers in town. A stout country
girl, who had followed nurse and her party, and taken her seat
beside them, heard this as well as they; and from that moment her
attention seemed bent upon the wearers of the red cloaks rather
than upon her own purchases. She stepped forward a pace or two,
when one of them turned at an accidental noise, and an immediate
recognition took place, to the surprise and amusement of the shop-
people.
The gipsy strode forward, holding out her brown hand, and
saying,
"Why, Miss Rebecca, I thought the sea-shore was our meeting-
place. So often as I have met you there, I never dreamed of seeing
you in town parts."
"Nor I neither, Mrs. Draper: but I am not long from home."
"Only come for a little pleasure, Miss Rebecca. Well; you know I
used to tell you that there was one that would give you what
pleasure you liked, if you chose to ask. I dare say now----"
And Mrs. Draper looked round, as if for some supposed companion
of Rebecca's; but Rebecca answered,
"Now, I told you, Mrs. Draper, long ago, to talk no nonsense; and
I'm here buying things, you see----"
"Ay, my dear; I see," said Mrs. Draper, looking no graver for being
told that she talked nonsense. "I see; but how's the father?"
"Why, but middling. Father's a wonderful hearty man for his years,
to be sure, considering some things."
"Ah! the ruin of the coast, which must have hurt his feelings. And
dame,--how's the dame?"
"O, she's well, and hobbling about, as usual. And I hope she'll
keep well. Dame and me are going to keep school--a boarding-
school for girls."
Mrs. Draper laughed heartily at the idea of Rebecca teaching
manners, as she said, and walking out behind her young ladies, two
and two.
"Ah! you may laugh," answered Rebecca, good-humouredly; "and
I know many people think I'm not a bit fit for it; but I don't care
what pains I take--I don't care what I do, if I could but see father
smile."
Mrs. Draper was struck dumb; for to her it seemed that Mr. Pim
not smiling was not Mr. Pim at all. What could have happened to
render it difficult for Rebecca to "make father smile?"
"It is not a venture, as it would be to set up a school in a town, to
set one up in the country," observed Rebecca. "'Tis such a common
thing, you know, to send children to the sea-side when they are
delicate; and dame always took great care of our chilblains; and, for
my part, I like nursing them when they are ill better than teaching,--
ever so much. And, you know, I can teach sewing. I think much of
needle-work; it is so useful! They shall do a deal of that.--And then
we have the maps. I can teach them those; and they shan't stick to
them too long. I remember, when I used to learn, how my back
ached, and I used to get the fidgets, and think, 'Well, now, shall we
ever leave off?' O, they shall go out and come in again; and we'll
find them something to read that they will get amused with; and if
anything more is wanting, why, father will help us, perhaps."
"He will help you all to run races on the downs. He is the one to
say 'One, two, three, and away.' But I really hoped, Miss Rebecca,
that you were buying for a house of your own."
"And where would be the use of a house of my own, unless father
was to be in it? and then it would be all one as his. No, the old
house must do,--at least for a beginning. If better times should
come, perhaps----"
"What! your father's school fell off, then. It was a fine one when
my children went; but I suppose the ruin of the coast ruined it?"
"'Tis all ruin to us. If it was only the loss of the trade to himself,
that was a great amusement. But it set the people all complaining
about not affording schooling for the children; for they had grown
careless about the fishing. And then, several went away for a time,
after the murder, for fear of the reward the government offered; and
that broke up everything. Father never got over that.--You may talk
about running races on the down. Father has never been to the
down with any heart since; for it was there that he spoke with poor
Nicholas the very day before----"
Rebecca stopped short, struck by the effect of what she was
saying on the gay ancient personage who sat near. Nurse came
forward, jerking an end of ribbon in one trembling hand, and
fumbling for her handkerchief with the other, while her countenance
resumed the expression of which her fellow-servants were tired, and
which they hoped she had laid aside with her mourning.
"My son, ma'am! I beg pardon for interrupting you, ma'am, but he
was my son. Nicholas, I heard you mention. If you knew him,
perhaps you would tell me anything you might know."
Rebecca and the gipsy looked at each other, which made nurse
appeal to Mrs. Draper, with confessions that she should not have
turned her away from the back-door so peremptorily, the last time
she came to tell the maids' fortunes, if she had thought she knew
anything about the Preventive Service and her poor son.
"We knew him very well indeed," said the plain-spoken Rebecca.
"He used to pass almost before our door twenty times in a day,
when he was upon watch; and our children used----"
"Ah, poor fellow! he was always like a child himself. He could
never say a cross word to a child," sobbed nurse.
"Nor to anybody else," feelingly observed Rebecca.
Charlotte saw that the scene was becoming such as little beseems
a busy shop, and she thought of an expedient for gratifying nurse
without exposing her feelings to observation. After a consultation
with Lucy, she asked Rebecca if she could come to tea at their
house, and tell nurse everything that she could recollect about
Nicholas. This Rebecca promised to do, though her stay in London
was to be very short. She had come only to "improve herself" for a
week or two, and to provide a few necessary additional articles for
her school-keeping; and her father began to want her at home.
While nurse was wiping her eyes, in preparation for finishing her
shopping, Mrs. Draper called upon Rebecca for an opinion respecting
the purchase the gipsies were about to make. Lucy followed, being
unable to restrain her curiosity; and impatiently did she beckon for
her sister to join her when she saw with how splendid an array the
counter was spread. Rebecca looked no less delighted.
"Yes, that will be the one," observed Mrs. Draper, seeing that
Rebecca's eye rested on a fabric of peculiar richness and beauty. "O,
yes, it is expensive; but it is worth the money; and these cheaper
silks have grown so common! Half the girls we tell fortunes to have
more or less silk about them. Our queen must not be taken for such
as live by a yearly wage. She must have of the best, and this must
be the one."
"O no, sir," Rebecca replied, drawing back from the gentleman
behind the counter, when he pressed some of his goods upon her
notice, "O, no, thank you, sir; they are all too dear for me to buy to
wear down by the sea-side."
"Yet you and these ladies have seen very pretty silks down by the
sea-side," observed Mr. Breme, for it was he who was himself
serving his best customers for the hour. "We all know that very
pretty silks have been seen by the sea-side; but that day is over."
"I don't know that, indeed," replied Rebecca. "They say that
Brighton will be fuller than ever next season, and that is the place
for pretty dresses. I suppose there are not many such beauties as
this sold anywhere?"
"More than you would suppose, ma'am; particularly of late. There
is no end now to the silks that may be lawfully had; and when that is
the case, more people think of wearing."
"And yet silks are very little cheaper than they were."
"At present, not much, as you say, ma'am. But people are so
pleased to think that they may wear what has been forbidden so
long, that they make a very brisk trade, I am happy to say. This will
lead to improvement and cheapness, and then people at home and
abroad will wear more still. The more you can get of a thing, the
more will be wanted. That is the rule, ma'am; from small beer to
satin dresses. The more can be had of a thing, the more will be
wanted. Could not you fancy one of these beautiful things, ma'am?"
"Very easily," replied Rebecca, "if a fairy would come this moment
and give me money to buy one, but not else. I am keeping yonder
gentleman waiting with the brown holland, which is what I wanted. I
must leave your silk dresses in your shop till I have earned one."
On further consideration, Rebecca feared she could not spare a
whole evening to nurse. She had so much to do, and her time was
so short! Would a call do? or meeting them in their walk? A better
plan than either struck Charlotte, Would not Rebecca meet them at
the dancing-school on Wednesday? One who was about to keep
school should see some dancing; and she and nurse might have
their chat in a corner, without anybody knowing what they were
talking about. This was certainly the best plan, and Rebecca agreed
to it, with grand expectations of the sight she was to see.
Chapter IV.

GRIEF AND DANCING.

Rebecca was so anxious about her appointment, that she arrived


at the dancing-school some time before the party she expected to
meet. A family of pretty little children were just sashed and
sandalled, and made ready to enter the great room, when she
arrived; and she drew back, with her usual modesty, to allow them
and their governess to pass. Their dancing-school curtsey filled her
with admiration; and she pulled up her head, and began bending her
knees in involuntary imitation, when she remembered that she had
better not try anything so new before so many spectators as were
assembled in the room. She went up to the dancing-master, in her
usual stumping pace, and apologized for not making such a curtsey
on her entrance as those young ladies, as she had not been used to
it. Mr. Brown condescended to give her a grin and a nod; and, when
he saw her stand as if not knowing where to turn next, did her the
further favour of pointing with his fiddle-bow to a seat which she
might be permitted to occupy.
There she sat, absorbed in what she saw, till nurse arrived with
Miss Charlotte and Miss Lucy in their new frocks, new shoes, new
gloves, and all things newer, if not handsomer, than the Miss
Bremes'.
"They are not here yet," whispered the one sister to the other.
"No, not yet; but I hope they will be sure to come. Why, look!
there is Adèle, and her sister with her! Nurse, we will go and sit
beside Adèle, and then you and Miss Pim can have your talk
comfortably by yourselves. I am sure the Jenkinsons will make room
for us on their bench."
The Jenkinsons made room, and it was immediately discovered
that Adèle came to learn to dance; upon hearing which, Lucy fell
into a reverie which lasted till a twang of the fiddle called her up for
her first quadrille.
Rebecca could not help breaking off her answers to nurse's
questions to wonder at Lucy's dancing, and admire the height of her
jumps, which, however, did not seem to please Mr. Brown quite so
well.
"Gently, gently, Miss Lucy," said he. "There may be too much
activity, ma'am, as well as too little. We are not at a leaping-match,
ma'am."
Lucy blushed and smiled, and still went on, sometimes nearly
losing her balance, and having already lost any grace she might
have been accustomed to display. She threw out her feet, sometimes
heel foremost, stuck her elbows in her sides to give herself more
concentrated power for a jump, and over-reached her mark in
crossing, till she nearly pulled her partner down. Mr. Brown declared,
at last, that he must send for a neighbouring builder to ascertain
whether the room was strong enough to bear Miss Lucy's dancing.
"Poor thing!" exclaimed Rebecca, "why should not they let her
dance as merrily as she likes? I will never stint my scholars in their
jumps."
Nurse thought that on the sea-shore, or on the green, it was
different from the present occasion. Miss Lucy came to learn to
dance, not to practise leaping. She could not imagine what
possessed the child to-day to dance as she did. Lucy was not strong,
and there was trouble enough sometimes in getting her to do more
than merely shuffle her feet.
"She just makes up when she is in spirits for what she can't do at
other times," was Rebecca's good-natured excuse, as she smiled at
the happy-looking fluttered Lucy.
Nurse beckoned the offender across the room to receive a rebuke,
as soon as the quadrille was finished; and Lucy came smiling,
panting, and fanning herself, and went away again, not at all
disheartened by nurse's lecture on manners. She was observed, as
she took her seat, to look up at Mademoiselle and Adèle, as much as
to say, "What do you think of my dancing?" Mademoiselle smiled,
and Adèle looked indifferent.
"Well, ma'am," said nurse, "so the Lieutenant's lady was very sorry
for my poor son. I remember he said something of her once in a
letter or a message."
"Said something of her! Why, well he might. He seemed to think
of little but pleasing or displeasing her; and she was kind to him
accordingly. I used to think he would never put his hat on again,
when he had taken it off to be spoken to by the ladies from the
station-house."
"Aye, there is another lady too. Was she kind to my poor son
also?"
"All very well: but Miss Storey had always more partiality for our
people than for the Preventive men. Poor father said,--one of the
last jokes I have heard him make,--that he saw nothing for it but
Miss Elizabeth taking to drinking or smoking, as she is so partial to
smuggling and all that sort of thing, and as she must now get what
she used to have so in other ways."
"But gloves come over against the law still, do not they?"
"Very few, high as the duty is. They are not sought after as they
were a while ago, for they say the English gloves are nearly as good
and as cheap now, and there are many more made. They say at the
Custom-house that near twice as many skins come into the country
as there were a few years ago; and so there is no occasion to
smuggle so many French."
"So Miss Storey does not go down to the poor people's cottages as
she used to do, my son told me, stealing out of sight of the guard?"
"Not she. She walks quite disconsolate along the beach to the
east, instead of going in and out, above and below, among the
downs, as she used to do when she had something to go out for."
"And the Lieutenant's lady too; does she go out as formerly?"
"As much as ever; but then she has something to do that makes it
worth while. She gets one of the Preventive people to carry a little
light table and her portfolio; and she paints,--never minding the
wind or the sun, or anything. If it blows much, she pins her paper
down at the corners, and puts her hair back, and paints away: and if
the sun is hot, up goes her large umbrella, and still she paints
away."
"Dear me! What does she paint? I wonder whether she ever
painted my poor son."
"I think she hardly began after her marriage till the spring weather
came on, and----"
"Ah! it was March when he came by his end. The 3d of March, at
half-past one in the morning, they tell me, ma'am."
"The lady has painted a good many of the guard, though,"
continued Rebecca, wishing to change the subject. "She has a
number of pictures of them, some drawing water at the wells on the
downs, or sitting polishing their arms in the martello towers, or
feeding their pigs at the station-house. We used to hear strangers
call those towers very ugly things; but she has made a world of
pretty pictures of them, looking as different as if they were not the
same places."
"She must be a clever lady, then; for there is nothing to my mind
so dull and uniform as those towers. They are worse than the
houses I saw last year in the Regent's Park,--all alike, except such
little differences as don't signify."
"Mrs. Storey would make even them look different, I fancy: for, as
to these towers,--some are white, standing on a yellow sand, with a
dark blue sky behind, and the sea a darker blue still,--which you
know it is sometimes. And then she makes a shadow from a cloud
come over the tower, and the sea all streaked with different colours;
and then it is the turn of the sails at sea to be white,--and a bird,
perhaps, hovering over the dark parts. Once she went out when the
moon was near the full, the Lieutenant himself carrying her cloak
and her sketch-book that time, and she wanting nothing besides but
her case of pencils. From that sketch she made a beautiful picture of
a grey sea, with the foam white in the moonlight; and in that case,
the tower was quite black on the side of the shadow, and so was the
guard on watch, as you saw him between you and the surf."
"I wish she had painted my poor boy, ma'am; or that he had lived
to carry her table. It would have made him so proud! But you say
she was sorry for what happened to him?"
"Everybody was sorry. Father, for one, has never got over it. But
the lady was on the beach when--when----"
"I know what you mean, my dear. Go on."
"Well; she looked so,--you can't think. Father was quite pale when
he came out from among the crowd of children that had got about
the mouth of the cavern; but he was nothing to her, in the
comparison."
"Indeed! Well--my dear----"
"O! so white, and so grieved, more than frightened. She beckoned
father to her, to settle what to do till some of the guard could come;
and then she called the children after her, and went away, to take
them away, though she could hardly walk."
"Dear me!" was all that escaped from nurse, who could not
prevent its being seen through her emotion that she was flattered by
this tale: and she did not attempt to conceal her gratification at
hearing what a crowd attended the funeral, and how the people
gathered to read and hear read the proclamation of reward for the
detection of the murderers. And all this interest was about her son!
Nothing could ever make up to her, she told Rebecca, for his body
being hidden for a time, as it was. It would have been such a
consolation to her to know that he made as beautiful a corpse as
she had often said he would. Those who had seen how her boy
looked when he was asleep might be sure that he would look better
when he was dead than ever he did when he was alive.
While Rebecca was meditating what she could say by way of
consolation for Nicholas not having made so beautiful a corpse as
might have been expected from him, certain sounds from the other
side of the room attracted her attention, and half diverted poor
nurse's.
"So the Lieutenant said of him.... O! no need to start, ma'am, at
Mr. Brown's rapping his fiddle. He is never really in a passion, though
he pretends anger, to keep the young folks in order."
"But they have done something to make him angry. Hark! what a
rattling in the fiddle!"
"But look at the corners of Mr. Brown's mouth. He does not know
how to help laughing all the time."
"As the children find out," observed Rebecca, seeing how the boys
peeped over one another's shoulders to see the effect of the old joke
of putting pease into a violin.
"And the girls are all huddled together, not a bit like young ladies,"
added nurse, moving solemnly towards her charge, patting their
backs, chucking their chins, and ascertaining that their feet were in
the first position. Alas! they were in none of the five lawful positions.
"Let us see what Adèle will make of her positions," whispered
Lucy, as she saw the little French girl led out, to take, as was
supposed, her first lesson. "She does not seem to mind it; but she
will when she finds she cannot keep her balance in the curtsey at
the last."
She was surprised that Mr. Brown tuned his violin. Music was not
wanted for teaching the positions. Mr. Brown must be in an absent
fit; and Adèle must be very conceited to smile and look at her ease,
on such an occasion. When she should have learned two years, and
be able to dance the same quadrilles as Lucy, she might look at
ease, and welcome: but already----
Already Adèle showed that she knew one position at least. Before
the words "Point the toe, ma'am," had passed the dancing-master's
lips, the toe was pointed as if the whole foot was made of something
as flexible as the thin sole of the little shoe.
"I do believe Adèle can dance," burst from Lucy's lips, as the
fiddle-bow gave its last flourish before making music. There was no
further room for doubt, though much for wonder. Adèle sped away,--
much as if she was winged: round and round,--hither and thither,--
up and down and across, not half so much out of breath with the
exertion as Lucy was with witnessing it, and with some thoughts
which came into her mind. "What a silly, stupid, vain thing I have
been! I hope Adèle and Mademoiselle did not find out that I wanted
to show off to them. How very bad Adèle must think my dancing, to
be sure! I did hear the windows rattle once, when I had jumped very
high; and Adele comes down as light as a feather. I wish we could
get back to two o'clock again. If I could make them all forget this
last hour, I would never show off again; at least, not till I was sure
that I could do a thing better than other people." And Lucy held her
fan to her chin to watch the rest of Adèle's performance in mute
admiration.
"Look, now, at that child of mine, with her fan at her chin, of all
places!" observed nurse, a-hemming to catch Lucy's attention, and
then bridling, and placing her knitting-needles (for nurse carried her
knitting everywhere but to church, and there fell asleep for want of
it) in the position in which she thought a fan ought to be held. Lucy,
vexed to be interrupted in her scrutiny, and so often chidden, tossed
her fan into her sister's lap, and turned to Mademoiselle to talk, and
thereby avoid the necessity of perceiving nurse's signs.
"Ay, that's the way children do," said nurse; "that was just as my
poor boy used to turn and get away from me, when I had been
whipping him, all for his good, as I used to tell him, and to make a
great man of him. He never liked it, nor saw what a great man he
might be some day, guarding his country on the top of those cliffs,
and dying, and all."
"And all for nothing," added the matter-of-fact Rebecca; "which
must make it the more hurting to you. Nay, now, do not look so
offended, as if I had said that Nicholas did not do his duty. He did
what he could; but it always seems to me a great fuss about
nothing."
"About nothing, ma'am? Is smuggling nothing?"
"That Coast Guard can't prevent smuggling, after all; and if they
could, is not it a much cheaper way of preventing it, to make
smuggling not worth while? Here, with all their spying, and
searching, and seizing, they can lay their hands on only 5000l. worth
of smuggled silk in a year, while we all know that fifty times that
much comes to be worn. Is not it a great fuss about nothing to risk
men's lives for a little matter like that? And they get no more in
proportion of tobacco or spirits, or anything else; so, as father says,
they might as well put smuggling out of our thoughts at once, or let
us do it in peace and quiet. Father has had no peace and quiet this
long while, nor ever will have till we find him something to do; and
that is hard to find. There is my brother out of the Custom-house,
too, being no longer wanted now they are reducing the business and
the salaries, and even talking of shutting up the Custom-house."
"You ought to be sorry, then, that people smuggle less than they
did,--as sorry as I fancy your father is, my dear."
"Why, as for that, it is very well to be in the Custom-house, to
collect the dues the government ought to have; but, for my part, I
never liked my brother's having to look to the seized goods, which
sometimes happened to be what he would rather have seen
anywhere else. If he had at once set himself to something else----"
"You had better send him here; my master wants more hands."
"With all my heart. If he had set himself to supply people's
demands at home, instead of preventing their being supplied from
abroad, it would have been all very well. But he liked better to
marry, and live upon my father, (supposing father to be rich,) than to
work at a new business; and now I must keep school, and do what I
can for them all. Dear me! what a pretty dance that is! I do not
know what I am to do, if the parents expect my girls to dance in that
manner. I forgot to look at Miss Lucy this time. Oh, ma'am, what can
be the matter with her? Do look how she is crying. Bless her poor
heart! how the tears run down!"
Lucy did, at this moment, exhibit a somewhat extraordinary
spectacle,--weeping and cutting capers, sobbing and attitudinizing,
and looking dolorously in the face of her partner (one of the Master
Bremes) whenever the turns of the dance obliged them to regard
each other. If she would have given any rational excuse for her
emotion, she would have been excused from dancing in tears; but
she was mute, and must therefore take her turn with her
companions. The fact was, that, while standing up and waiting for
the signal to begin, Lucy had chanced to turn her eyes on a mirror
that hung opposite, and to see a young gentleman behind her
wriggling in imitation of her earlier exploits of this day; and, what
was worse, she saw that Mr. Brown indulged in a broad grin at the
joke. Not all her attempts to think of something pleasant,--of her
new frock, Mademoiselle's museum, and the kitten promised by
Adèle,--could enable her to keep down her tears. They only came
the faster the more she struggled against them; and all hope of
concealing them was over before Rebecca's kind heart became
moved by her sorrow, and Adèle squeezed in sympathy the hand
which she encountered in the course of the figure. This sympathy
only aggravated the evil: it caused a long, crowing sob to resound
through the room, moving the boys to laughter, and everybody else
to pity. It was a lost case, and the credit of the day,--of Adele's first
day at the dancing-school,--was irretrievable.
Mademoiselle removed to a seat next nurse, to inquire what could
have been the matter with Lucy all this day; and when told that she
had been well and in high spirits up to the moment of entering the
room, she was anxious to be allowed to feel her pulse, and ascertain
whether there was fever in the case,--nothing short of fever being,
in her opinion, sufficient to account for her alternate boisterousness
and melancholy. Lucy being surrendered to Mademoiselle, presently
began to grow calm. The scarlet flush which had spread over her
neck faded, and the sobs subsided, as she assured her friend that
she was not at all ill: it was all her own fault. This mystery was
received in respectful silence, and a long pause ensued, at the end
of which Lucy looked up through her tears to say,--
"How beautifully Adèle dances!"
"Yes, she dances prettily; but she wants practice, and does not
take exercise enough; and that is the reason why we have brought
her to learn again. Adèle is a lazy girl in some things: are you not,
Adèle?"
"But where did she learn to dance? I never saw such dancing. I do
not believe anybody here will ever dance so well. There's Nancy
Breme: her feet go well enough, but she pokes; and her sister
carries her head high enough,--mighty high,--like the proud that are
going to have a fall, nurse says; but she turns in the left foot, as Mr.
Brown is for ever telling her. And there is----"
"Well, well; we will not dispute Adèle's dancing better than any
body here."
"O, but I was going to say myself too. I meant to find fault with
my own dancing, and Charlotte's."
"No occasion, my dear. I have heard what Mr. Brown has to say
about it, you know; and he is a better judge than either of us.
Perhaps you will go with us to Lyons, some day, and see where
Adèle used to dance, under the chestnuts by the river-side. Or, if you
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like