0% found this document useful (0 votes)
12 views80 pages

A Smarter Way To Learn Javascript The New Approach That Uses Technology To Cut Your Effort in Half 1st Mark Myers Download

The document discusses 'A Smarter Way to Learn JavaScript' by Mark Myers, which proposes using technology to enhance the learning process and reduce effort. It emphasizes interactive exercises, cognitive portion control, and the advantages of eBooks over traditional books for teaching programming. The book includes practical coding examples and encourages structured study sessions to optimize learning outcomes.

Uploaded by

uvoduez1174
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
0% found this document useful (0 votes)
12 views80 pages

A Smarter Way To Learn Javascript The New Approach That Uses Technology To Cut Your Effort in Half 1st Mark Myers Download

The document discusses 'A Smarter Way to Learn JavaScript' by Mark Myers, which proposes using technology to enhance the learning process and reduce effort. It emphasizes interactive exercises, cognitive portion control, and the advantages of eBooks over traditional books for teaching programming. The book includes practical coding examples and encourages structured study sessions to optimize learning outcomes.

Uploaded by

uvoduez1174
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/ 80

A Smarter Way To Learn Javascript The New

Approach That Uses Technology To Cut Your Effort


In Half 1st Mark Myers download

https://ebookbell.com/product/a-smarter-way-to-learn-javascript-
the-new-approach-that-uses-technology-to-cut-your-effort-in-
half-1st-mark-myers-4749730

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

A Smarter Way To Learn Python Learn It Faster Remember It Longer Mark


Myers

https://ebookbell.com/product/a-smarter-way-to-learn-python-learn-it-
faster-remember-it-longer-mark-myers-50497986

A Smarter Way To Learn Html Css Learn It Faster Remember It Longer 1st
Edition Mark Myers

https://ebookbell.com/product/a-smarter-way-to-learn-html-css-learn-
it-faster-remember-it-longer-1st-edition-mark-myers-5107932

A Smarter Way To Learn Python Learn It Faster Remember It Longer First


Edition Mark Myers

https://ebookbell.com/product/a-smarter-way-to-learn-python-learn-it-
faster-remember-it-longer-first-edition-mark-myers-7142450

A Smarter Way To Learn Jquery Learn It Faster Remember It Longer Mark


Myers

https://ebookbell.com/product/a-smarter-way-to-learn-jquery-learn-it-
faster-remember-it-longer-mark-myers-6975664
Integrated Html And Css A Smarter Faster Way To Learn Virginia Debolt

https://ebookbell.com/product/integrated-html-and-css-a-smarter-
faster-way-to-learn-virginia-debolt-920462

Toaster Oven Perfection A Smarter Way To Cook On A Smaller Scale


Americas Test Kitchen

https://ebookbell.com/product/toaster-oven-perfection-a-smarter-way-
to-cook-on-a-smaller-scale-americas-test-kitchen-50197272

The Americas Test Kitchen Quick Family Cookbook A Faster Smarter Way
To Cook Everything From Americas Most Trusted Test Kitchen Americas
Test Kitchen

https://ebookbell.com/product/the-americas-test-kitchen-quick-family-
cookbook-a-faster-smarter-way-to-cook-everything-from-americas-most-
trusted-test-kitchen-americas-test-kitchen-55154602

Sleep Smarter 21 Essential Strategies To Sleep Your Way To A Better


Body Better Health And Bigger Success Stevenson

https://ebookbell.com/product/sleep-smarter-21-essential-strategies-
to-sleep-your-way-to-a-better-body-better-health-and-bigger-success-
stevenson-35007600

Sleep Smarter 21 Proven Tips To Sleep Your Way To A Better Body Better
Health And Bigger Success Shawn Stevenson

https://ebookbell.com/product/sleep-smarter-21-proven-tips-to-sleep-
your-way-to-a-better-body-better-health-and-bigger-success-shawn-
stevenson-5035554
A Smarter Way to Learn JavaScript
The new approach that uses technology to cut your effort in half

Mark Myers
copyright © 2013 by Mark Myers

2
Chapters
1. Alerts
2. Variables for Strings
3. Variables for Numbers
4. Variable Names Legal and Illegal
5. Math Expressions: familiar operators
6. Math Expressions: unfamiliar operators
7. Math Expressions: eliminating ambiguity
8. Concatenating text strings
9. Prompts
10. if statements
11. Comparison operators
12. if...else and else if statements
13. Testing sets of conditions
14. if statements nested
15. Arrays
16. Arrays: adding and removing elements
17. Arrays: removing, inserting, and extracting elements
18. for loops
19. for loops: flags, Booleans, array length, and breaks
20. for loops nested
21. Changing case
22. Strings: measuring length and extracting parts
23. Strings: finding segments
24. Strings: finding a character at a location
25. Strings: replacing characters
26. Rounding numbers
27. Generating random numbers
28. Converting strings to integers and decimals
29. Converting strings to numbers, numbers to strings
30. Controlling the length of decimals
31. Getting the current date and time
32. Extracting parts of the date and time
33. Specifying a date and time
34. Changing elements of a date and time
35. Functions
36. Functions: passing them data
37. Functions: passing data back from them
38. Functions: local vs. global variables
39. switch statements: how to start them
40. switch statements: how to complete them

3
41. while loops
42. do...while loops
43. Placing scripts
44. Commenting
45. Events: link
46. Events: button
47. Events: mouse
48. Events: fields
49. Reading field values
50. Setting field values
51. Reading and setting paragraph text
52. Manipulating images and text
53. Swapping images
54. Swapping images and setting classes
55. Setting styles
56. Target all elements by tag name
57. Target some elements by tag name
58. The DOM
59. The DOM: Parents and children
60. The DOM: Finding children
61. The DOM: Junk artifacts and nodeType
62. The DOM: More ways to target elements
63. The DOM: Getting a target's name
64. The DOM: Counting elements
65. The DOM: Attributes
66. The DOM: Attribute names and values
67. The DOM: Adding nodes
68. The DOM: Inserting nodes
69. Objects
70. Objects: Properties
71. Objects: Methods
72. Objects: Constructors
73. Objects: Constructors for methods
74. Objects: Prototypes
75. Objects: Checking for properties and methods
76. Browser control: Getting and setting the URL
77. Browser control: Getting and setting the URL another way
78. Browser control: Forward and reverse
79. Browser control: Filling the window with content
80. Browser control: Controlling the window's size and location
81. Browser control: Testing for popup blockers
82. Form validation: text fields

4
83. Form validation: drop-downs
84. Form validation: radio buttons
85. Form validation: ZIP codes
86. Form validation: email
87. Exceptions: try and catch
88. Exceptions: throw
89. Handling events within JavaScript

5
How I propose to
cut your effort in half
by using technology.

When you set out to learn anything as complicated as JavaScript, you sign up for some
heavy cognitive lifting. If I had to guess, I'd say the whole project of teaching yourself a
language burns at least a large garden-cart load of brain glucose. But here's what you may not
realize: When you teach yourself, your cognitive load doubles.
Yes, all the information is right there in the book if the author has done a good job. But
learning a language entails far more than reading some information. You need to commit the
information to memory, which requires some kind of plan. You need to practice. How are you
going to structure that? And you need some way to correct yourself when you go off-course.
Since a book isn't the best way to help you with these tasks, most authors don't even try. Which
means all the work of designing a learning path for yourself is left to you. And this do-it-
yourself meta-learning, this struggle with the question of how to master what the book is telling
you, takes more effort than the learning itself.
Traditionally, a live instructor bridges the gap between reading and learning. Taking a
comprehensive course or working one-on-one with a mentor is still the best way to learn
JavaScript if you have the time and can afford it. But, as long as many people prefer to learn on
their own, why not use the latest technology as a substitute teacher? Let the book lay out the
principles. Then use an interactive program for memorization, practice, and correction. When
the computer gets into the act, you'll learn twice as fast, with half the effort. It's a smarter way
to learn JavaScript. It's a smarter way to learn anything.
And as long as we're embracing new technology, why not use all the tech we can get our
hands on to optimize the book? Old technology—i.e. the paper book—has severe limitations
from an instructional point of view. New technology—i.e. the ebook—is the way to go, for
many reasons. Here are a few:
Color is a marvelous information tool. That's why they use it for traffic lights. But printing
color on paper multiplies the cost. Thanks to killer setup charges, printing this single word
—color—in a print-on-demand book adds thirty dollars to the retail price. So color is usually
out, or else the book is priced as a luxury item. With an ebook, color is free.
Paper itself is expensive, so there usually isn't room to do everything the author would
like to do. A full discussion of fine points? Forget it. Extra help for the rough spots? Can't
afford it. Hundreds of examples? Better delete some. But no such limitation applies to an
ebook. What do an extra hundred digital pages cost? Usually nothing.
When a book is published traditionally, it may take up to a year for the manuscript to get
into print. This means there isn't time for extensive testing on the target audience, or for the
revisions that testing would inevitably suggest. And once the book is in print, it's a big,

6
expensive deal to issue revised editions. Publishers put it off as long as possible. Reader
feedback usually doesn't lead to improvements for years. An ebook can go from manuscript to
book in a day, leaving lots of time for testing and revision. After it's published, new editions
with improvements based on reader feedback can come out as often as the author likes, at no
cost.
With all this going for them, is there any doubt that all the best instructional books are
going to be ebooks? And would anyone deny that the most helpful thing an author can do for
you, in addition to publishing a good book electronically, is to take on the whole teaching job,
not just part of it, by adding interactivity to help you with memorization, practice, and
correction?
Here, then, is how I propose to use current technology to help you learn JavaScript in half
the time, with half the effort.

Cognitive portion control. Testing showed me that when they're doing hard-core
learning, even strong-minded people get tired faster than I would have expected. You may
be able to read a novel for two hours at a stretch, but when you're studying something new
and complicated, it's a whole different ballgame. My testing revealed that studying new
material for about ten minutes is the limit, before most learners start to fade. But here's the
good news: Even when you've entered the fatigue zone after ten minutes of studying,
you've still got the mental wherewithal to practice for up to thirty minutes. Practice that's
designed correctly takes less effort than studying, yet teaches you more. Reading a little
and practicing a lot is the fastest way to learn.
500 coding examples that cover every aspect of what you're learning. Examples make
concepts easy to grasp and focus your attention on the key material covered in each
chapter. Color cues embedded in the code help you commit rules to memory. Did I go
overboard and put in more examples that you need? Well, if things get too easy for you,
just skip some them.
Tested on naive users. The book includes many rounds of revisions based on feedback
from programming beginners. It includes extra-help discussions to clarify concepts that
proved to be stumbling blocks during testing. Among the testers: my technophobe wife,
who discovered that, with good instruction, she could code—and was surprised to find
that she enjoyed it. For that matter, I got a few surprises myself. Some things that are
simple to me turned out not to be not so simple to some readers. Rewriting ensued.
Free interactive coding exercises paired with each chapter—1,750 of them in all.
They're the feature that testers say helps them the most. No surprise there. According to
the New York Times, psychologists "have shown that taking a test—say, writing down all
you can remember from a studied prose passage—can deepen the memory of that passage
better than further study." I would venture that this goes double when you're learning to
code. After reading each chapter, go online and practice everything you learned. Each
chapter ends with a link to its accompanying online exercises. Find an index of all the
exercises at http://www.ASmarterWayToLearn.com/js/.

7
Live coding experience. In scripting, the best reward is seeing your code run flawlessly.
Most practice sessions include live coding exercises that let you see your scripts execute
in the browser.

8
How to use this book

This isn't a book quite like any you've ever owned before, so a brief user manual might be
helpful.

Study, practice, then rest. If you're intent on mastering the fundamentals of JavaScript,
as opposed to just getting a feel for the language, work with this book and the online
exercises in a 15-to-30-minute session, then take a break. Study a chapter for 5 to 10
minutes. Immediately go online at http://www.ASmarterWayToLearn.com/js and code for
10 to 20 minutes, practicing the lesson until you've coded everything correctly. Then go
for a walk.
Use the largest, most colorful screen available. This book can be read on small phone
screens and monochrome readers, but you'll be happier if things appear in color on a
larger screen. I use color as an important teaching tool, so if you're reading in black-and-
white, you're sacrificing some of the extra teaching value of a full-color ebook. Colored
elements do show up as a lighter shade on some black-and-white screens, and on those
devices the effect isn't entirely lost, but full color is better. As for reading on a larger
screen— the book includes more than 2,000 lines of example code. Small screens break
long lines of code into awkward, arbitrary segments, jumbling the formatting. While still
decipherable, the code becomes harder to read. If you don't have a mobile device that's
ideal for this book, consider installing the free Kindle reading app on your laptop.
If you're reading on a mobile device, go horizontal. For some reason, I resist doing this
on my iPad unless I'm watching a video. But even I, Vern Vertical, put my tablet into
horizontal mode to proof this book. So please: starting with Chapter 1, do yourself a
favor and rotate your tablet, reader, or phone to give yourself a longer line of text. It'll
help prevent the unpleasant code jumble mentioned above.
Do the coding exercises on a physical keyboard. A mobile device can be ideal for
reading, but it's no way to code. Very, very few Web developers would attempt to do
their work on a phone. The same thing goes for learning to code. Theoretically, most of
the interactive exercises could be done on a mobile device. But the idea seems so
perverse that I've disabled online practice on tablets, readers, and phones. Read the book
on your mobile device if you like. But practice on your laptop.
If you have an authority problem, try to get over it. When you start doing the
exercises, you'll find that I can be a pain about insisting that you get every little detail
right. For example, if you indent a line one space instead of two spaces, the program
monitoring your work will tell you the code isn't correct, even though it would still run
perfectly. Do I insist on having everything just so because I'm a control freak? No, it's
because I have to place a limit on harmless maverick behavior in order to automate the

9
exercises. If I were to grant you as much freedom as you might like, creating the
algorithms that check your work would be, for me, a project of driverless-car
proportions. Besides, learning to write code with fastidious precision helps you learn to
pay close attention to details, a fundamental requirement for coding in any language.
Subscribe, temporarily, to my formatting biases. Current code formatting is like
seventeenth-century spelling. Everyone does it his own way. There are no universally
accepted standards. But the algorithms that check your work when you do the interactive
exercises need standards. They can't grant you the latitude that a human teacher could,
because, let's face it, they aren't that bright. So I've had to settle on certain conventions.
All of the conventions I teach are embraced by a large segment of the coding community,
so you'll be in good company. But that doesn't mean you'll be married to my formatting
biases forever. When you begin coding projects, you'll soon develop your own opinions
or join an organization that has a stylebook. Until then, I'll ask you to make your code look
like my code.
Email me with any problems or questions. The book and exercises have been tested on
many learners, but haven't been tested on you. If you hit a snag, if you're just curious about
something, or if I've found some way to give you fits, email me at
mark@ASmarterWayToLearn.com. I'll be happy to hear from you. I'll reply promptly.
And, with your help, I'll probably learn something that improves the next edition.

10
1
Alerts
An alert is a box that pops up to give the user a message. Here's code for an alert that
displays the message "Thanks for your input!"
alert("Thanks for your input!");

alert is a keyword—that is, a word that has special meaning for JavaScript. It means,
"Display, in an alert box, the message that follows." Note that alert isn't capitalized. If you
capitalize it, the script will stop.
The parentheses are a special requirement of JavaScript, one that you'll soon get used to.
You'll be typing parens over and over again, in all kinds of JavaScript statements.
In coding, the quoted text "Thanks for your input!" is called a text string or simply a
string. The name makes sense: it's a string of characters enclosed in quotes. Outside the coding
world, we'd just call it a quotation.
Note that the opening parenthesis is jammed up against the keyword, and the opening
quotation mark is hugging the opening parenthesis. Since JavaScript ignores spaces (except in
text strings), you could write...
alert ( "Thanks for your input!" );

But I want you to know the style conventions of JavaScript, so I'll ask you to always omit
spaces before and after parentheses.
In English, a careful writer ends every declarative sentence with a period. In scripting, a
careful coder ends every statement with a semicolon. (Sometimes complex, paragraph-like
statements end with a curly bracket instead of a semicolon. That's something I'll cover in a
later chapter.) A semicolon isn't always necessary, but it's easier to end every statement with a
semicolon, rather than stop to figure out whether you need one. In this training, I'll ask you to
end every statement (that doesn't end with a curly bracket) with a semicolon.

Some coders write window.alert instead of, simply, alert. This is a highly formal but
perfectly correct way to write it. Most coders prefer the short form. We'll stick to the
short form in this training.
In the example above, some coders would use single rather than double quotation marks.
This is legal, as long as it's a matching pair. But in a case like this, I'll ask you to use
double quotation marks.

11
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/1.html

12
2
Variables for Strings
Please memorize the following facts.

My name is Mark.
My nationality is U.S.

Now that you've memorized my name and nationality, I won't have to repeat them,
literally, again. If I say to you, "You probably know other people who have my name," you'll
know I'm referring to "Mark."
If I ask you whether my nationality is the same as yours, I won't have to ask, "Is your
nationality the same as U.S.?" I'll ask, "Is your nationality the same as my nationality?" You'll
remember that when I say "my nationality," I'm referring to "U.S.", and you'll compare your
nationality to "U.S.", even though I haven't said "U.S." explicitly.
In these examples, the terms "my name" and "my nationality" work the same way
JavaScript variables do. My name is a term that refers to a particular value, "Mark." In the
same way, a variable is a word that refers to a particular value.
A variable is created when you write var (for variable) followed by the name that you
choose to give it. It takes on a particular value when you assign the value to it. This is a
JavaScript statement that creates the variable name and assigns the value "Mark" to it.
var name = "Mark";

Now the variable name refers to the text string "Mark".


Note that it was my choice to call it name. I could have called it myName, xyz, lol, or
something else. It's up to me how to name my variables, within limits.
With the string "Mark" assigned to the variable name, my JavaScript code doesn't have to
specify "Mark" again. Whenever JavaScript encounters name, JavaScript knows that it's a
variable that refers to "Mark".
For example, if you ask JavaScript to print name, it remembers the value that name refers
to, and prints...
Mark
The value that a variable refers to can change.
Let's get back to the original examples, the facts I asked you to memorize. These facts can
change, and if they do, the terms my name and my nationality will refer to new values.
I could go to court and change my name to Ace. Then my name is no longer Mark. If I
want you to address me correctly, I'll have to tell you that my name is now Ace. After I tell you
that, you'll know that my name doesn't refer to the value it used to refer to (Mark), but refers to

13
a new value (Ace).
If I transfer my nationality to U.K., my nationality is no longer U.S. It's U.K. If I want you
to know my nationality, I'll have to tell you that it is now U.K. After I tell you that, you'll know
that my nationality doesn't refer to the original value, "U.S.", but now refers to a new value.
JavaScript variables can also change.
If I code...
var name = "Mark";

name refers to "Mark". Then I come along and code the line...
name = "Ace";

Before I coded the new line, if I asked JavaScript to print name, it printed...
Mark
But that was then.
Now if I ask JavaScript to print name, it prints...
Ace
A variable can have any number of values, but only one at a time.
You may be wondering why, in the statement above that assigns "Ace" to name, the
keyword var is missing. It's because the variable was declared earlier, in the original
statement that assigned "Mark" to it. Remember, var is the keyword that creates a variable—
the keyword that declares it. Once a variable has been declared, you don't have to declare it
again. You can just assign the new value to it.
You can declare a variable in one statement, leaving it undefined. Then you can assign a
value to it in a later statement, without declaring it again.
var nationality;
nationality = "U.S.";

In the example above, the assignment statement follows the declaration statement
immediately. But any amount of code can separate the two statements, as long as the
declaration statement comes first. In fact, there's no law that says you have to ever define a
variable that you've declared.
JavaScript variable names have no inherent meaning to JavaScript.
In English, words have meaning. You can't use just any word to communicate. I can say,
"My name is Mark," but, if I want to be understood, I can't say, "My floogle is Mark." That's
nonsense.
But with variables, JavaScript is blind to semantics. You can use just any word (as long
as it doesn't break the rules of variable-naming). From JavaScript's point of view...
var floogle = "Mark";

...is just as good as...

14
var name = "Mark";

If you write...
var floogle = "Mark";

...then ask JavaScript to print floogle, JavaScript prints...


Mark
Within limits, you can name variables anything you want, and JavaScript won't care.
var lessonAuthor = "Mark";
var guyWhoKeepsSayingHisOwnName = "Mark";
var x = "Mark";

JavaScript's blindness to meaning notwithstanding, when it comes to variable names,


you'll want to give your variables meaningful names, because it'll help you and other coders
understand your code.
Again, the syntactic difference between variables and text strings is that variables are
never enclosed in quotes, and text strings are always enclosed in quotes.
It's always...
var lastName = "Smith";
var cityOfOrigin = "New Orleans";
var aussieGreeting = "g'Day";

If it's an alphabet letter or word, and it isn't enclosed in quotes, and it isn't a keyword that
has special meaning for JavaScript, like alert, it's a variable.
If it's some characters enclosed in quotes, it's a text string.
If you haven't noticed, let me point out the spaces between the variable and the equal sign,
and between the equal sign and the value.
var nickname = "Bub";

These spaces are a style choice rather than a legal requirement. But I'll ask you to include
them in your code throughout the practice exercises.
In the last chapter you learned to write...
alert("Thanks for your input!");

When the code executes, a message box displays saying "Thanks for your input!"
But what if you wrote these two statements instead:
1 var thanx = "Thanks for your input!"
2 alert(thanx);

Instead of placing a text string inside the parentheses of the alert statement, the code
above assigns the text string to a variable. Then it places the variable, not the string, inside the
parentheses. Because JavaScript always substitutes the value for the variable, JavaScript

15
displays—not the variable name thanx but the text to which it refers, "Thanks for your input!"
That same alert, "Thanks for your input!" displays.

16
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/2.html

17
3
Variables for Numbers
A string isn't the only thing you can assign to a variable. You can also assign a number.
var weight = 150;

Having coded the statement above, whenever you write weight in your code, JavaScript
knows you mean 150. You can use this variable in math calculations.
If you ask JavaScript to add 25 to weight...
weight + 25

...JavaScript, remembering that weight refers to 150, will come up with the sum 175.
Unlike a string, a number is not enclosed in quotes. That's how JavaScript knows it's a
number that it can do math on and not a text string, like a ZIP code, that it handles as text.
But then, since it's not enclosed in quotes, how does JavaScript know it's not a variable?
Well, because a number, or any combination of characters starting with a number, can't be used
as a variable name. If it's a number, JavaScript rejects it as a variable. So it must be a number.
If you enclose a number in quotation marks, it's a string. JavaScript can't do addition on it.
It can do addition only on numbers not enclosed in quotes.
Now look at this code.
1 var originalNum = 23;
2 var newNum = originalNum + 7;

In the second statement in the code above, JavaScript substitutes the number 23 when it
encounters the variable originalNum. It adds 7 to 23. And it assigns the result, 30, to the
variable newNum.
JavaScript can also handle an expression made up of nothing but variables. For
example...
1 var originalNum = 23;
2 var numToBeAdded = 7;
3 var newNum = originalNum + numToBeAdded;

A variable can be used in calculating its own new value.


1 var originalNum = 90;
2 originalNum = originalNum + 10;

If you enclose a number in quotation marks and add 7...


1 var originalNum = "23";
2 var newNum = originalNum + 7;

18
...it won't work, because JavaScript can't sum a string and a number. JavaScript interprets
"23" as a word, not a number. In the second statement, it doesn't add 23 + 7 to total 30. It does
something that might surprise you. I'll tell you about this in a subsequent chapter. For now,
know that a number enclosed by quotation marks is not a number, but a string, and JavaScript
can't do addition on it.
Note that any particular variable name can be the name of a number variable or string
variable. From JavaScript's point of view, there's nothing in a name that denotes one kind of
variable or another. In fact, a variable can start out as one type of variable, then become
another type of variable.
Did you notice what's new in...
1 var originalNumber = 23;
2 var newNumber = originalNumber + 7;

The statement assigns to the variable newNumber the result of a mathematical operation.
The result of this operation, of course, is a number value.
The example mixes a variable and a literal number in a math expression. But you could
also use nothing but numbers or nothing but variables. It's all the same to JavaScript.
I've told you that you can't begin a variable name with a number. The statement...
var 1stPresident = "Washington";

...is illegal, thanks to that initial "1" in the variable name.


But you can include numbers in variable names, as long as none of them come first. The
statement...
var prezWhoCame1st = "Washington";

...is legal.
Conveniently, if you specify a number instead of a string as an alert message...
alert(144);

...or if you specify a variable that represents a number as an alert message...


1 var caseQty = 144;
2 alert(caseQty);

...JavaScript automatically converts it to a string and displays it.

19
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/3.html

20
4
Variable Names Legal and Illegal
You've already learned three rules about naming a variable: You can't enclose it in
quotation marks. The name can't be a number or start with a number. It can't be any of
JavaScript's keywords—the special words that act as programming instructions, like alert
and var.
Here are the rest of the rules:

A variable name can't contain any spaces.


A variable name can contain only letters, numbers, dollar signs, and underscores.
Though a variable name can't be any of JavaScript's keywords, it can contain keywords.
For example, userAlert and myVar are legal.
Capital letters are fine, but be careful. Variable names are case sensitive. A rose is not a
Rose. If you assign the string "Floribundas" to the variable rose, and then ask JavaScript
for the value assigned to Rose, you'll come up empty.
I teach the camelCase naming convention. Why "camelCase"? Because there is a hump or
two (or three) in the middle if the name is formed by more than one word. A camelCase
name begins in lower case. If there's more than one word in the name, each subsequent
word gets an initial cap, creating a hump. If you form a variable name with only one
word, like response, there's no hump. It's a camel that's out of food. Please adopt the
camelCase convention. It'll make your variable names more readable, and you'll be less
likely to get variable names mixed up.

Examples:
userResponse
userResponseTime
userResponseTimeLimit
response

Make your variable names descriptive, so it's easier to figure out what your code means
when you or someone else comes back to it three weeks or a year from now. Generally,
userName is better than x, and faveBreed is better than favBrd, though the shorter names
are perfectly legal. You do have to balance readability with conciseness, though.
bestSupportingActressInADramaOrComedy is a model of clarity, but may be too much
for most of us to type or read. I'd shorten it.

21
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/4.html

22
5
Math expressions:
Familiar operators
Wherever you can use a number, you can use a math expression. For example, you're
familiar with this kind of statement.
var popularNumber = 4;

But you can also write this.


var popularNumber = 2 + 2;

You can also write:


alert(2 + 2);

This displays the messge "4" in an alert box.


When it sees a math expression, JavaScript always does the math and delivers the result.
Here's a statement that subtracts 24 from 12, assigning -12 to the variable.
var popularNumber = 12 - 24;

This one assigns the product of 3 times 12, 36, to the variable.
var popularNumber = 3 * 12;

In this one, the number 10 is assigned to a variable. Then 1 is added to the variable, and
the sum, 210, is assigned to a second variable.
As usual, you can mix variables and numbers.
1 var num = 10;
2 var popularNumber = num + 200;

You can also use nothing but variables.


1 var num = 10;
2 var anotherNum = 1;
3 var popularNumber = num + anotherNum;

The arithmetic operators I've been using, +, -, *, and /, are undoubtedly familiar to you.
This one may not be:
var whatsLeftOver = 10 % 3;

23
% is the modulus operator. It doesn't give you the result of dividing one number by
another. It gives you the remainder when the division is executed.
If one number divides evenly into another, the modulus operation returns 0. In the
following statement, 0 is assigned to the variable.
var whatsLeftOver = 9 % 3;

24
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/5.html

25
6
Math expressions:
Unfamiliar operators
There are several specialized math expressions you need to know. Here's the first one.
num++;

This is a short way of writing...


num = num + 1;

It increments the variable by 1.


You decrement using minuses instead of pluses.
num--;

You can use these expressions in an assignment. But the result may surprise you.
1 var num = 1;
2 var newNum = num++;

In the example above, the original value of num is assigned to newNum, and num is
incremented afterward. If num is originally assigned 1 in the first statement, the second
statement boosts its value to 2. newNum gets the original value of num, 1.
If you place the pluses before the variable, you get a different result.
1 var num = 1;
2 var newNum = ++num;

In the statements above, both num and newNum wind up with a value of 2.
If you put the minuses after the variable, the new variable is assigned the original value,
and the first variable is decremented.
1 var num = 1;
2 var newNum = num--;

num is decremented to 0, and newNum gets the original value of num, 1.


But if you put the minuses before the variable, newNum is assigned the decremented, not
the original, value. Both num and newNum wind up with a value of 0.
1 var num = 1;
2 var newNum = --num;

26
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/6.html

27
7
Math expressions:
Eliminating ambiguity
Complex arithmetic expressions can pose a problem, one that you may remember from
high school algebra. Look at this example and tell me what the value of totalCost is.
var totalCost = 1 + 3 * 4;

The value of totalCost varies, depending on the order in which you do the arithmetic. If
you begin by adding 1 + 3, then multiply the sum by 4, totalCost has the value of 16. But if
you go the other way and start by multiplying 3 by 4, then add 1 to the product, you get 13.
In JavaScript as in algebra, the ambiguity is cleared up by precedence rules. As in
algebra, the rule that applies here is that multiplication operations are completed before
addition operations. So totalCost has the value of 13.
But you don't have to memorize JavaScript's complex precedence rules. You can finesse
the issue by using parentheses to eliminate ambiguity. Parens override all the built-in
precedence rules. They force JavaScript to complete operations enclosed by parens before
completing any other operations.
When you use parens to make your intentions clear to JavaScript, it also makes your code
easier to grasp, both for other coders and for you when you're trying to understand your own
code a year down the road. In this statement, the parentheses tell JavaScript to first multiply 3
by 4, then add 1. The result: 13.
var totalCost = 1 + (3 * 4);

If I move the parentheses, the arithmetic is done in a different order. In this next statement,
the placement of the parens tells JavaScript to first add 1 and 3, then multiply by 4. The result
is 16.
var totalCost = (1 + 3) * 4;

Here's another example.


var resultOfComputation = (2 * 4) * 4 + 2;

By placing the first multiplication operation inside parentheses, you've told JavaScript to
do that operation first. But then what? The order could be..

1. Multiply 2 by 4.

28
2. Multiply that product by 4.
3. Add 2 to it.

...giving resultOfComputation a value of 34.


Or the order could be...

1. Multiply 2 by 4.
2. Multiply that product by the sum of 4 and 2.

...giving resultOfComputation a value of 48.


The solution is more parentheses.
If you want the second multiplication to be done before the 2 is added, write this...
resultOfComputation = ((2 * 4) * 4) + 2;

But if you want the product of 2 times 4 to be multiplied by the number you get when you
total 4 and 2, write this...
resultOfComputation = (2 * 4) * (4 + 2);

29
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/7.html

30
8
Concatenating text strings
In Chapter 1 you learned to display a message in an alert, coding it this way.
alert("Thanks for your input!");

Or you could code it this way.


1 var message = "Thanks for your input!";
2 alert(message);

But suppose you wanted to personalize a message. In another part of your code you've
asked the user for her name and assigned the name that she entered to a variable, userName.
(You don't know how to do this yet. You'll learn how in a subsequent chapter.)
Now, you want to combine her name with a standard "Thanks" to produce an alert that
says, for example, "Thanks, Susan!"
When the user provided her name, we assigned it to the variable userName. This is the
code.
alert("Thanks, " + userName + "!");

Using the plus operator, the code combines—concatenates—three elements into the
message: the string "Thanks, " plus the string represented by the variable userName plus the
string "!"
Note that the first string includes a space. Without it, the alert would read,
"Thanks,Susan!".
You can concatenate any combination of strings and variables, or all strings or all
variables. For example, I can rewrite the last example this way.
1 var message = "Thanks, ";
2 var banger = "!";
3 alert(message + userName + banger);

Here it is, with three strings.


alert("Thanks, " + "Susan" + "!");

You can assign a concatenation to a variable.


1 var message = "Thanks, ";
2 var userName = "Susan";
3 var banger = "!";
4 var customMess = message + userName + banger;
5 alert(customMess);

31
If you put numbers in quotes, JavaScript concatenates them as strings rather than adding
them. This code...
alert("2" + "2");

...displays the message "22".


If you mix strings and numbers...
alert("2 plus 2 equals " + 2 + 2);

...JavaScript automatically converts the numbers to strings, and displays the message "2
plus 2 equals 22".

32
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/8.html

33
9
Prompts
A prompt box asks the user for some information and provides a response field for her
answer.
This code asks the user the question "Your species?" and provides a default answer in the
response field, "human". She can change the response. Whether she leaves the default response
as-is or changes it to something else, her response is assigned to the variable.
var spec = prompt("Your species?", "human");

Prompt code is like alert code, with two differences.

In a prompt, you need a way to capture the user's response. That means you need to start
by declaring a variable, followed by an equal sign.
In a prompt, you can specify a second string. This is the default response that appears in
the field when the prompt displays. If the user leaves the default response as-is and just
clicks OK, the default response is assigned to the variable. It's up to you whether you
include a default response.

As you might expect, you can assign the strings to variables, then specify the variables
instead of strings inside the parentheses.
1 var question = "Your species?";
2 var defaultAnswer = "human";
3 var spec = prompt(question, defaultAnswer);

The user's response is a text string. Even if the response is a number, it comes back as a
string. For example, consider this code.
1 var numberOfCats = prompt("How many cats?");
2 var tooManyCats = numberOfCats + 1;

Since you're asking for a number, and the user is presumably entering one, you might
expect the math in the second statement to work. For example, if the user enters 3, the variable
tooManyCats should have a value of 4, you might think. But no such luck. All responses to
prompts come back as strings. When the string, "3", is linked with a plus to the number, 1,
JavaScript converts the 1 to a string and concatenates. So the value of tooManyCats winds up
being not 4 but "31". You'll learn how to solve this problem in a subsequent chaper.
If the user enters nothing and clicks OK, the variable is assigned an empty string: ""
If the user clicks Cancel, the variable is assigned a special value, null.

34
Some coders write window.prompt instead of, simply, prompt. This is a highly formal
but perfectly correct way to write it. Most coders prefer the short form. We'll stick to the
short form in this training.
In the example above, some coders would use single rather than double quotation marks.
This is legal, as long as it's a matching pair. But in a case like this, I'll ask you to use
double quotation marks.

35
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/9.html

36
10
if statements
Suppose you code a prompt that asks, "Where does the Pope live?"
If the user answers correctly, you display an alert congratulating him.
This is the code.
1 var x = prompt("Where does the Pope live?");
2 if (x === "Vatican") {
3 alert("Correct!");
4 }

If the user enters "Vatican" in the prompt field, the congratulations alert displays. If he
enters something else, nothing happens. (This simplified code doesn't allow for other correct
answers, like "The Vatican." I don't want to get into that now.)
There's a lot to take in here. Let's break it down.
An if statement always begins with if. The space that separates it from the parenthesis is
new to you. I've taught you to code alerts and prompts with the opening parenthesis running up
against the keyword: alert("Hi"); Now I'm asking you not to do that in an if statement. It's
purely a matter of style, but common style rules sanction this inconsistency.
Following the if keyword-plus-space is the condition that's being tested—does the
variable that's been assigned the user's response have a value of "Vatican"?
The condition is enclosed in parentheses.
If the condition tests true, something happens. Any number of statements might execute. In
this case, only one statement executes: a congratulatory alert displays.
The first line of an if statement ends with an opening curly bracket. An entire if statement
ends with a closing curly bracket on its own line. Note that this is an exception to the rule that
a statement ends with a semicolon. It's common to omit the semicolon when it's a complex
statement that's paragraph-like and ends in a curly bracket.
But what about that triple equal sign? You might think that it should just be an equal sign,
but the equal sign is reserved for assigning a value to a variable. If you're testing a variable
for a value, you can't use the single equal sign.
If you forget this rule and use a single equal sign when you should use the triple equal
sign, the code won't run properly.
As you might expect, you can use a variable instead of a string in the example code.
1 var correctAnswer = "Vatican";
2 if (x === correctAnswer) {
3 alert("Correct!");
4 }

When a condition is met, you can have any number of statements execute.

37
1 var correctAnswer = "Vatican";
2 if (x === correctAnswer) {
3 score++;
4 userIQ = "genius";
5 alert("Correct!");
6 }

Some coders write simple if statements without curly brackets, which is legal. Some put
the opening curly bracket on its own line. Some put the whole if statement, if it's simple,
on a single line. I find it easiest not to have to make case-by-case decisions, so I format
all if statements the same way, as shown in the example. In the exercises, I'll ask you to
follow these style rules for all if statements.
In most cases, a double equal sign == is just as good as a triple equal sign ===. However,
there is a slight technical difference, which you may never need to know. Again, to keep
things simple, I always use the triple equal sign.

38
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/10.html

39
11
Comparison operators
Let's talk a little more about ===. It's a type of comparison operator, specifically an
equality operator. As you learned in the last chapter, you use it to compare two things to see if
they're equal.
You can use the equality operator to compare a variable with a string, a variable with a
number, a variable with a math expression, or a variable with a variable. And you can use it to
compare various combinations. All of the following are legal first lines in if statements:
if (fullName === "Mark" + " " + "Myers") {
if (fullName === firstName + " " + "Myers") {
if (fullName === firstName + " " + "Myers") {
if (fullName === "firstName + " " + lastName) {
if (totalCost === 81.50 + 135) {
if (totalCost === materialsCost + 135) {
if (totalCost === materialsCost + laborCost) {
if (x + y === a - b) {

When you're comparing strings, the equality operator is case-sensitive. "Rose" does not
equal "rose."
Another comparison operator, !==, is the opposite of ===. It means is not equal to.
1 if (yourTicketNumber !== 487208) {
2 alert("Better luck next time.");
3 }

Like ===, the not-equal operator can be used to compare numbers, strings, variables, math
expressions, and combinations.
Like ===, string comparisons using the not-equal operator are case-sensitive. It's true that
"Rose" !== "rose".
Here are 4 more comparison operators, usually used to compare numbers.

> is greater than

< is less than

>= is greater than or equal to

<= is less than or equal to

In the examples below, all the conditions are true.


if (1 > 0) {
if (0 < 1) {
if (1 >= 0) {

40
if (1 >= 1) {
if (0 <= 1) {
if (1 <= 1) {

Just as the double equal sign can usually be used instead of the triple equal sign, != can
usually be used instead of !==. In the exercises, I'll ask you to stick to !==.

41
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/11.html

42
12
if...else and else if statements
The if statements you've coded so far have been all-or-nothing. If the condition tested
true, something happened. If the condition tested false, nothing happened.
1 var x = prompt("Where does the Pope live?");
2 if (x === "Vatican") {
3 alert("Correct!");
4 }
Quite often, you want something to happen either way. For example:
1 var x = prompt("Where does the Pope live?");
2 if (x === "Vatican") {
3 alert("Correct!");
4 }
5 if (x !== "Vatican") {
6 alert("Wrong answer");
7 }

In this example, we have two if statements, one testing for "Vatican," and another testing
for not-"Vatican". So all cases are covered, with one alert or another displaying, depending on
what the user has entered.
The code works, but it's more verbose than necessary. The following code is more
concise and, as a bonus, more readable.
1 if (x === "Vatican") {
2 alert("Correct!");
3 }
4 else {
5 alert("Wrong answer");
6 }

In the style convention I follow, the else part has exactly the same formatting as the if part.
As in the if part, any number of statements can execute within the else part.
1 var correctAnswer = "Vatican";
2 if (x === correctAnswer) {
3 alert("Correct!");
4 }
5 else {
6 score--;
7 userIQ = "problematic";
8 alert("Incorrect");
9 }

else if is used if all tests above have failed and you want to test another condition.
1 var correctAnswer = "Vatican";
2 if (x === correctAnswer) {

43
3 alert("Correct!");
4 }
5 else if (x === "Rome") {
6 alert("Incorrect but close");
7 }
8 else {
9 alert("Incorrect");
10}

In a series of if tests, JavaScript stops testing whenever a condition tests true.

There are so many ways to format if statements and their variations that the range of
possibilities is almost endless. I'm partial to the format I've showed you, because it's easy
to learn and produces readable code. I'll ask you to stick to this format throughout the
exercises.

44
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/12.html

45
13
Testing sets of conditions
Using the if statement, you've learned to test for a condition. If the condition is met, one or
more statements execute. But suppose not one but two conditions have to be met in order for a
test to succeed.
For example, if a guy weighs more than 300 pounds, he's just a great big guy. But if he
weighs more than 300 pounds and runs 40 yards in under 6 seconds? You're going to invite
him to try out for the NLF as a lineman. You can test for a combination of conditions in
JavaScript by using...
&&
Here's the code.
1 if (weight > 300 && time < 6) {
2 alert("Come to our tryout!");
3 }
4 else {
5 alert("Come to our cookout!");
6 }
You can chain any number of conditions together.
1 if (weight > 300 && time < 6 && age > 17 && gender === "male") {
2 alert("Come to our tryout!");
3 }
4 else {
5 alert("Come to our cookout!");
6 }

You can also test for any of a set of conditions. This is the operator.
||
Here's an example.
1 if (SAT > avg || GPA > 2.5 || sport === "football") {
2 alert("Welcome to Bubba State!");
3 }
4 else {
5 alert("Have you looked into appliance repair?");
6 }

If in line 1 any or all of the conditions are true, the first alert displays. If none of them are
true (line 4), the second alert displays.
You can combine any number of and and or conditions. When you do, you create
ambiguities. Take this line...
if (age > 65 || age < 21 && res === "U.S.") {
This can be read in either of two ways.

The first way it can be read: If the person is over 65 or under 21 and, in addition to either

46
of these conditions, is also a resident of the U.S. Under this interpretation, both columns
need to be true in the following table to qualify as a pass.

The second way it can be read: If the person is over 65 and living anywhere or is under
21 and a resident of the U.S. Under this interpretation, if either column in the following
table is true, it's a pass.

It's the same problem you face when you combine mathematical expressions. And you
solve it the same way: with parentheses.
In the following code, if the subject is over 65 and a U.S. resident, it's a pass. Or, if the
subject is under 21 and a U.S. resident, it's a pass.
if ((age > 65 || age < 21) && res === "U.S.") {

In the following code, if the subject is over 65 and living anywhere, it's a pass. Or, if the
subject is under 21 and living in the U.S., it's a pass.
if (age > 65 || (age < 21 && res === "U.S.")) {

47
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/13.html

48
14
if statements nested
Check out this code.
1 if ((x === y || a === b) && c === d) {
2 g = h;
3 }
4 else {
5 e = f;
6 }

In the code above, if either of the first conditions is true, and, in addition, the third
condition is true, then g is assigned h. Otherwise, e is assigned f.
There's another way to code this, using nesting.
1 if (c === d) {
2 if (x === y) {
3 g = h;
4 }
5 else if (a === b) {
6 g = h;
7 }
8 else {
9 e = f;
10 }
11 }
12 else {
13 e = f;
14 }

Nest levels are communicated to JavaScript by the positions of the curly brackets. There
are three blocks nested inside the top-level if. If the condition tested by the top-level if—that c
has the same value as d—is false, none of the blocks nested inside executes. The opening curly
bracket on line 1 and the closing curly bracket on line 11 enclose all the nested code, telling
JavaScript that everything inside is second-level.
For readability, a lower level is indented 2 spaces beyond the level above it.
In the relatively simple set of tests and outcomes shown in this example, I would prefer to
use the more concise structure of multiple conditions. But when things get really complicated,
nested ifs are a good way to go.

49
Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/js/14.html

50
Another Random Document on
Scribd Without Any Related Topics
But more often, it must be owned, I laid a darker tribute there.
The gloomy channel into which my young mind had been forced was
overhung, as might be expected, by a sombre growth. The legends
of midnight spirits, and the tales of blackest crime, shed their poison
on me. From the dust of the library I exhumed all records of the
most famous atrocities, and devoured them at my father's grave. As
yet I was too young to know what grief it would cause to him who
slept there, could he but learn what his only child was doing. That
knowledge would at once have checked me, for his presence was
ever with me, and his memory cast my thoughts, as moonlight
shapes the shadows.
The view from the churchyard was a lovely English scene. What
higher praise can I give than this? Long time a wanderer in foreign
parts, nothing have I seen that comes from nature to the heart like a
true English landscape.
The little church stood back on a quiet hill, which bent its wings
in a gentle curve to shelter it from the north and east. These
bending wings were feathered, soft as down, with, larches,
hawthorn, and the lightly-pencilled birch, between which, here and
there, the bluff rocks stood their ground. Southward, and beyond
the glen, how fair a spread of waving country we could see! To the
left, our pretty lake, all clear and calm, gave back the survey of the
trees, until a bold gnoll, fringed with alders, led it out of sight. Far
away upon the right, the Severn stole along its silver road, leaving
many a reach and bend, which caught towards eventide the notice
of the travelled sun. Upon the horizon might be seen at times, the
blue distance of the Brecon hills.
Often when I sat here all alone, and the evening dusk came on,
although I held those volumes on my lap, I could not but forget the
murders and the revenge of men, the motives, form, and evidence
of crime, and nurse a vague desire to dream my life away.
Sometimes also my mother would come here, to read her
favourite Gospel of St. John. Then I would lay the dark records on
the turf, and sit with my injury hot upon me, wondering at her
peaceful face. While, for her sake, I rejoiced to see the tears of
comfort and contentment dawning in her eyes, I never grieved that
the soft chastenment was not shed on me. For her I loved and
admired it; for myself I scorned it utterly.
The same clear sunshine was upon us both: we both were
looking on the same fair scene--the gold of ripening corn, the
emerald of woods and pastures, the crystal of the lake and stream;
above us both the peaceful heaven was shed, and the late distress
was but a night gone by--wherefore had it left to one the dew of life,
to the other a thunderbolt? I knew not the reason then, but now I
know it well.
Although my favourite style of literature was not likely to
improve the mind, or yield that honeyed melancholy which some
young ladies woo, to me it did but little harm. My will was so bent
upon one object, and the whole substance and shape of my
thoughts so stanch in their sole ductility thereto, that other things
went idly by me, if they showed no power to promote my end. But
upon palpable life, and the doings of nature I became observant
beyond my age. Things in growth or motion round me impressed
themselves on my senses, as if a nerve were touched. The uncoiling
of a fern-frond, the shrinking of a bind-weed blossom, the escape of
a cap-pinched bud, the projection of a seed, or the sparks from a
fading tuberose, in short, the lighter prints of Nature's sandalled
foot, were traced and counted by me. Not that I derived a maiden
pleasure from them, as happy persons do, but that it seemed my
business narrowly to heed them.
As for the proud phenomena of imperial man, so far as they yet
survive the crucible of convention--the lines where cunning
crouches, the smile that is but a brain-flash, the veil let down across
the wide mouth of greed, the guilt they try to make volatile in
charity,--all these I was not old and poor enough to learn. Yet I
marked unconsciously the traits of individuals, the mannerism, the
gesture, and the mode of speech, the complex motive, and the
underflow of thought. So all I did, and all I dreamed, had one colour
and one aim.
My education, it is just to say, was neglected by no one but
myself. My father's love of air and heaven had descended to me, and
nothing but my mother's prayers or my own dark quest could keep
me in the house. Abstract principles and skeleton dogmas I could
never grasp; but whatever was vivid and shrewd and native,
whatever had point and purpose, was seized by me and made my
own. My faculties were not large, but steadfast now, and
concentrated.
Though several masters tried their best, and my governess did
all she could, I chose to learn but little. Drawing and music (to
soothe my mother) were my principal studies. Of poetry I took no
heed, except in the fierce old drama.
Enough of this. I have said so much, not for my sake, but for
my story.
CHAPTER V.

On the fifth anniversary of my father's death, when I was fifteen


years of age, I went to visit (as I always did upon that day) the fatal
room. Although this chamber had been so long unused, the furniture
was allowed to remain; and I insisted passionately that it should be
my charge. What had seemed the petulance of a child was now the
strong will of a thoughtful girl.
I took the key from my bosom, where I always kept it, and
turned it in the lock. No mortal had entered that door since I passed
it in my last paroxysm, three weeks and a day before. I saw a
cobweb reaching from the black finger-plate to the third mould of
the beading. The weather had been damp, and the door stuck fast
to the jamb, then yielded with a crack. Though I was bold that day,
and in a mood of triumph, some awe fell on me as I entered. There
hung the heavy curtain, last drawn by the murderer's hand; there
lay the bed-clothes, raised for the blow, and replaced on death; and
there was the pillow where sleep had been so prolonged. All these I
saw with a forced and fearful glance, and my breath stood still as
the wind in a grave.
Presently a light cloud floated off the sun, and a white glare
from the snow of the morning burst across the room. My sight was
not so dimmed with tears as it generally was when I stood there, for
I had just read the history of a long-hidden crime detected, and my
eyes were full of fierce hope. But stricken soon to the wonted depth
of sadness, with the throbs of my heart falling like the avenger's
step, I went minutely through my death-inspection. I felt all round
the dusty wainscot, opened the wardrobes and cupboards, raised
the lids of the deep-bayed window-seats, peered shuddering down
the dark closet, where I believed the assassin had lurked, started
and stared at myself in the mirror, to see how lone and wan I
looked, and then approached the bed, to finish my search in the
usual place, by lying and sobbing where my father died. I had
glanced beneath it and round the pillars, and clutched the curtain as
if to squeeze out the truth, and was just about to throw myself on
the coverlet and indulge the fit so bitterly held at bay, when
something on the hangings above the head-board stopped me
suddenly. There I saw a narrow line of deep and glowing red. It
grew so vivid on the faded damask, and in the white glare of the
level sun, that I thought it was on fire. Hastily setting a chair by the
pillar, for I would not tread on that bed, I leaped up, and closely
examined the crimson vein.
Without thinking, I knew what it was--the heart-blood of my
father. There were three distinct and several marks, traced by the
reeking dagger. The first on the left, which had caught my glance,
was the broadest and clearest to read. Two lines, meeting at a right
angle, rudely formed a Roman L. Rudely I say, for the poniard had
been too rich in red ink, which had clotted where the two strokes
met. The second letter was a Roman D, formed also by two bold
strokes, the upright very distinct, the curve less easily traced at the
top, but the lower part deep and clear. The third letter was not so
plain. It looked like C at first, but upon further examination I felt
convinced that it was meant for an O, left incomplete through the
want of more writing fluid; or was it then that my mother had seized
the dark author by the hair, as he stooped to incline his pen that the
last drop might trickle down?
Deciphering thus with fingers and eyes, I traced these letters of
blood, one by one, over and over again, till they danced in my gaze
like the northern lights. I stood upon tiptoe and kissed them; I cared
not what I was doing: it was my own father's blood, and I thought
of the heart it came from, not of the hand which shed it. When I
turned away, the surprise, for which till then I had found no time,
broke full upon me. How could these letters, in spite of all my
vigilance, so long have remained unseen? Why did the murderer
peril his life yet more by staying to write the record, and seal
perhaps the conviction of his deed? And what did these characters
mean? Of these three questions, the first was readily solved. The
other two remained to me as new shadows of wonder. Several
causes had conspired to defer so long this discovery. In the first
place, the damask had been of rich lilac, shot with a pile of carmine,
which, in the waving play of light, glossed at once and obscured the
crimson stain, until the fading hues of art left in strong contrast
nature's abiding paint. Secondly, my rapid growth and the clearness
of my eyes that day lessened the distance and favoured perception.
Again--and this was perhaps the paramount cause--the winter sun,
with rays unabsorbed by the snow, threw his sheer dint upon that
very spot, keen, level, and uncoloured--a thing which could happen
on few days in the year, and for few minutes each day, and which
never had happened during my previous search. Perhaps there was
also some chemical action of the rays of light which evoked as well
as showed the colour; but of this I do not know enough to speak.
Suffice it that the letters were there, at first a great shock and terror,
but soon a strong encouragement to me.
My course was at once to perpetuate the marks and speculate
upon them at leisure, for I knew not how fleeting they might be. I
hurried downstairs, and speaking to no one procured some clear
tissue paper. Applying this to the damask, and holding a card
behind, I carefully traced with a pencil so much of the letters as
could be perceived through the medium, and completed the sketch
by copying most carefully the rest; It was, however, beyond my
power to keep my hand from trembling. A shade flitted over my
drawing--oh, how my heart leaped!
When I had finished the pencil-sketch, and before it was inked
over (for I could not bring myself to paint it red), I knelt where my
father died and thanked God for this guidance to me. By the time I
had dried my eyes the sun was passed and the lines of blood were
gone, even though I knew where to seek them, having left a pin in
the damask. By measuring I found that the letters were just three
feet and a quarter above the spot where my father's head had been.
The largest of them, the L, was three inches long and an eighth of
an inch in width; the others were nearly as long, but nothing like so
wide.
Trembling now, for the rush of passion which stills the body was
past, and stepping silently on the long silent floor, I went to the deep
dark-mullioned window and tried to look forth. After all my lone
tumult, perhaps I wanted to see the world. But my jaded eyes and
brain showed only the same three letters burning on the snow and
sky. Evening, a winter evening, was fluttering down. The sun was
spent and stopped by a grey mist, and the landscape full of
dreariness and cold. For miles, the earth lay white and wan, with
nothing to part life from death. No step was on the snow, no wind
among the trees; fences, shrubs, and hillocks were as wrinkles in a
winding-sheet, and every stark branch had like me its own cold load
to carry.
But on the left, just in sight from the gable-window, was a spot,
black as midnight, in the billowy snow. It was the spring which had
stored for me the footprints. Perhaps I was superstitious then; the
omen was accepted. Suddenly a last gleam from the dauntless sun
came through the ancient glass, and flung a crimson spot upon my
breast. It was the red heart, centre of our shield, won with Coeur de
Lion.
Oh scutcheons, blazonments, and other gewgaws, by which
men think to ennoble daylight murders, how long shall fools account
it honour to be tattooed with you? Mercy, fellow-feeling, truth,
humility, virtues that never flap their wings, but shrink lest they
should know they stoop, what have these won? Gaze sinister, and
their crest a pillory.
With that red pride upon my breast, and that black heart within,
and my young form stately with revenge, I was a true descendant of
Crusaders.

CHAPTER VI.

To no one, not even to Thomas Kenwood (in whom I confided


most), did I impart the discovery just described. Again and again I
went to examine those letters, jealous at once of my secret, and
fearful lest they should vanish. But though they remained perhaps
unaltered, they never appeared so vivid as on that day.
With keener interest I began once more to track, from page to
page, from volume to volume, the chronicled steps of limping but
sure-footed justice.
Not long after this I was provided with a companion. "Clara,"
said my guardian one day at breakfast, "you live too much alone.
Have you any friends in the neighbourhood?"
"None in the world, except my mother."
"Well, I must try to survive the exclusion. I have done my best.
But your mother has succeeded in finding a colleague. There's a
cousin of yours coming here very soon."
"Mother dear," I cried in some surprise, "you never told me that
you had any nieces."
"Neither have I, my darling," she replied, "nor any nephews
either; but your uncle has; and I hope you will like your visitor."
"Now remember, Clara," resumed my guardian, "it is no wish of
mine that you should do so. To me it is a matter of perfect
indifference; but your mother and myself agreed that a little society
would do you good."
"When is she to come?" I asked, in high displeasure that no one
had consulted me.
"He is likely to be here to-morrow."
"Oh," I exclaimed, "the plot is to humanize me through a young
gentleman, is it? And how long is he to stay in my house?"
"In your house! I suppose that will depend upon your mother's
wishes."
"More likely upon yours," I cried; "but it matters little to me."
He said nothing, but looked displeased; my mother doing the
same, I was silent, and the subject dropped. But of course I saw
that he wished me to like his new importation, while he dissembled
the wish from knowledge of my character.
Two years after my father's birth, his father had married again.
Of the second wedlock the only offspring was my guardian, Edgar
Vaughan. He was a posthumous son, and his mother in turn
contracted a second marriage. Her new husband was one Stephen
Daldy, a merchant of some wealth. By him she left one son, named
Lawrence, and several daughters. This Lawrence Daldy, my
guardian's half-brother, proved a spendthrift, and, while scattering
the old merchant's treasure married a fashionable adventuress. As
might be expected, no retrenchment ensued, and he died in poverty,
leaving an only child.
This boy, Clement Daldy, was of my own age, or thereabout,
and, in pursuance of my guardian's plan, was to live henceforth with
us.
He arrived under the wing of his mother, and his character
consisted in the absence of any. If he had any quality at all by which
one could know him from a doll, it was perhaps vanity; and if his
vanity was singular enough to have any foundation, it could be only
in his good looks. He was, I believe, as pretty a youth as ever talked
without mind, or smiled without meaning. Need it be said that I
despised him at once unfathomably?
His mother was of a very different order. Long-enduring, astute,
and plausible, with truth no more than the pith of a straw, she
added thereto an imperious spirit, embodied just now in an odious
meekness. Whatever she said or did, in her large contempt of the
world, her lady-abbess walk, and the chastened droop of her brilliant
eyes, she conveyed through it all the impression of her humble
superiority. Though profoundly convinced that all is vanity, she was
reluctant to force this conviction on minds of a narrower scope, and
dissembled with conscious grace her knowledge of human nature.
To a blunt, outspoken child, what could be more disgusting? But
when upon this was assumed an air of deep pity for my ignorance,
and interest in my littleness, it became no longer bearable.
This Christian Jezebel nearly succeeded in estranging my
mother from me. The latter felt all that kindness towards her which
people of true religion, when over-charitable, conceive towards all
who hoist and salute the holy flag. Our sweet pirate knew well how
to make the most of this.
For myself, though I felt that a hypocrite is below the level of
hate, I could not keep my composure when with affectionate
blandness our visitor dared to "discharge her sacred duty of
impressing on me the guilt of harbouring thoughts of revenge." Of
course, she did not attempt it in the presence of my mother; but my
guardian was there, and doubtless knew her intention.
It was on a Sunday after the service, and she had stayed for the
sacrament.
"My sweet child," she began, "you will excuse what I am about
to say, as I only speak for your good, and from a humble sense that
it is the path of duty. It has pleased God, in His infinite wisdom, to
afflict your dear mother with a melancholy so sensitive, that she
cannot bear any allusion to your deeply-lamented father. You have
therefore no female guidance upon a subject which justly occupies
so much of your thoughts. Your uncle Edgar, in his true affection for
you, has thought it right that you should associate more with
persons calculated to develop your mind."
Now I hate that word "develop;" and I felt my passion rising,
but let her go on:--
"Under these circumstances, it grieves me deeply, my poor dear
child, to find you still display a perversity, and a wilful neglect of the
blessed means of grace, which must (humanly speaking) draw down
a judgment upon you. Now, open your heart to me, the whole of
your little unregenerate heart, you mysterious but (I firmly believe)
not ill-disposed lambkin. Tell me all your thoughts, your broodings,
your dreams--in fact, your entire experiences. Uncle Edgar will leave
the room, if you wish it."
"Certainly not," I said.
"Quite right, my dear; have no secrets from one who has been
your second father. Now tell me all your little troubles. Make me your
mother-confessor. I take the deepest interest in you. True, I am only
a weak and sinful woman, but my chastisements have worked
together for my edification, and God has been graciously pleased to
grant me peace of mind."
"You don't look as if you had much," I cried.
Her large eyes flashed a quick start from their depths, like the
stir of a newly-fathomed sea. My guardian's face gleamed with a
smile of sly amusement. Recovering at once her calm objective
superiority, she proceeded:
"I have been troubled and chastened severely, but now I
perceive that it was all for the best. But perhaps it is not very
graceful to remind me of that. Yet, since all my trials have worked
together for my good, on that account I am, under Providence,
better qualified to advise you, in your dark and perilous state. I have
seen much of what thoughtless people call 'life.' But in helping you, I
wish to proceed on higher principles than those of the world. You
possess, beyond question, a strong and resolute will, but in your
present benighted course it can lead only to misery. Now, what is
the principal aim of your life, my love?"
"The death of my father's murderer."
"Exactly so. My unhappy child, I knew it too well. Though a dark
sin is your leading star, I feel too painfully my own shortcomings,
and old unregenerate tendencies, to refuse you my carnal sympathy.
You know my feelings, Edgar."
"Indeed, Eleanor," replied my guardian, with an impenetrable
smile, "how should I? You have always been such a model of every
virtue."
She gave him a glance, and again addressed me. "Now
suppose, Clara Vaughan, that, after years of brooding and lonely
anguish, you obtain your revenge at last, who will be any the better
for it?"
"My father and I."
"Your father indeed! How you wrong his sweet and most
forgiving nature!"
This was the first thing she had said that touched me; and that
because I had often thought of it before. But I would not let her see
it.
"Though his nature were an angel's," I cried, "as I believe it
was, never could he forgive that being who tore him from me and
my mother. I know that he watches me now, and must be cold and a
wanderer, until I have done my duty to him and myself."
"You awful child. Why, you'll frighten us all. But you make it the
more my duty. Come with me now, and let me inculcate the
doctrines of a higher and holier style."
"Thank you, Mrs. Daldy, I want no teaching, except my
mother's."
"You are too wilful and headstrong for her. Come to me, my
poor stray lamb."
"I would sooner go to a butcher, Mrs. Daldy."
"Is it possible? Are you so lost to all sense of right?"
"Yes, if you are right," I replied; and left the room.
Thenceforth she pursued tactics of another kind. She tried me
with flattery and fictitious confidence, likely from a woman of her
maturity to win a young girl, by inflating self-esteem: she even
feigned a warm interest in my search, and wished to partake in my
readings and secret musings. Indeed, I could seldom escape her. I
am ready to own that, by her suggestions and quick apprehension,
she gained some ascendancy over me, but not a tenth part of what
she thought she had won; and I still continued to long for her
departure. Of this, however, no symptom appeared: she made
herself quite at home, and did her best to become indispensable to
my mother.
Clement Daldy had full opportunity to commend himself to my
favour. We were constantly thrown together, in the presence of his
mother, and the absence of mine. For a long time, I was too young,
and too much engrossed by the object for which I lived, to have any
inkling of their scheme; but suddenly a suspicion broke upon me. My
guardian and his sister-in-law had formed, as I thought, a deliberate
plot for marrying me, when old enough, to that tailor's block. The
one had been so long accustomed to the lordship of the property, to
some county influence, and great command of money, that it was
not likely he would forego the whole without a struggle. But he knew
quite well that the moment I should be of age I would dispense with
his wardship, and even with his residence there, and devote all I had
to the pursuit of my "monomania." All his endeavours to make me
his thrall had failed, partly from my suspicions, partly from a
repugnance which could not be conquered. Of course, I intended to
give him an ample return for his stewardship, which had been wise
and unwearying. But this was not what he wanted. The motives of
his accomplice require no explanation. If once this neat little scheme
should succeed, I must remain in their hands, Clement being
nobody, until they should happen to quarrel for me.
To show what Clement Daldy was, a brief anecdote is enough.
When we were about sixteen years old, we sat in the park one
morning, at the corner of the lake; Clement's little curled spaniel,
which he loved as much as he could love anything, was gambolling
round us. As the boy lounged along, half asleep, on the rustic chair,
with his silky face shaded by a broad hat, and his bright curls
glistening like daffodils playing, I thought what a pretty peep-show
he made, and wondered whether he could anyhow be the owner of
a soul.
"Oh, Clara," he lisped, as he chanced to look up--"Couthin Clara,
I wish you wouldn't look at me tho."
"And did it look fierce at its dolly?" I said; for I was always
good-natured to him. "Dolly knows I wouldn't hurt it, for it's house
full of sugar-plums."
"Then do let me go to thleep; you are such a howwid girl."
So I hushed him off with a cradle song. But before the long
lashes sunk flat on his cheeks, like the ermine tips on my muff, and
while his red lips yet trembled like cherries in the wind, my attention
was suddenly drawn to the lake. There was a plashing, and barking,
and hissing, and napping of snow-white wings--poor Juan engaged
in unequal combat with two fierce swans who had a nest on the
island. The poor little dog, though he fought most gallantly, was
soon driven into deep water, and the swans kept knocking him under
with rapid and powerful strokes. Seeing him almost drowned, I
called Clement to save him at once.
"I can't," said the brave youth; "you go if you like. They'll kill
me, and I can't bear it; and the water ith tho cold."
In a moment I pushed off the boat which was near, jumped into
it, and, seizing an oar, contrived to beat back the swans, and lifted
the poor little dog on board, gasping, half-drowned, and woefully
beaten. Meanwhile my lord elect had leaped on the seat for safety,
and was wringing his white little hands, and dancing and crying,
"Oh, Clara'll be throwned, and they'll say it was me. Oh, what thall I
do! what thall I do!"
Even when I brought him his little pet safe, he would not touch
him, because he was wet; so I laid him full on his lap.

CHAPTER VII.
The spring of the year 1849 was remarkable, throughout the
western counties, for long drought. I know not how it may be in the
east of England, but I have observed that in the west long droughts
occur only in the spring and early summer. In the autumn we have
sometimes as much as six weeks without rain, and in the summer a
month at most, but all the real droughts (so far as my experience
goes) commence in February or March; these are, however, so rare,
and April has won such poetic fame for showers, and July for heat
and dryness, that what I state is at variance with the popular
impression.
Be that as it may, about Valentine's-day, 1849, and after a
length of very changeable weather, the wind fixed its home in the
east, and the sky for a week was grey and monotonous. Brilliant
weather ensued; white frost at night, and strong sun by day. The
frost became less biting as the year went on, and the sun more
powerful; there were two or three overcast days, and people hoped
for rain. But no rain fell, except one poor drizzle, more like dew than
rain.
With habits now so ingrained as to become true pleasures, I
marked the effects of the drought on all the scene around me. The
meadows took the colour of Russian leather, the cornlands that of a
knife-board. The young leaves of the wood hung pinched and crisp,
unable to shake off their tunics, and more like catkins than leaves.
The pools went low and dark and thick with a coppery scum (in
autumn it would have been green), and little bubbles came up and
popped where the earth cracked round the sides. The tap-rooted
plants looked comely and brave in the morning, after their drink of
dew, but flagged and flopped in the afternoon, as a clubbed
cabbage does. As for those which had only the surface to suck, they
dried by the acre, and powdered away like the base of a bonfire.
The ground was hard as horn, and fissured in stars, and angles,
and jagged gaping cracks, like a dissecting map or a badly-plastered
wall. It amused me sometimes to see a beetle suddenly cut off from
his home by that which to him was an earthquake. How he would
run to and fro, look doubtfully into the dark abyss, then, rising to the
occasion, bridge his road with a straw. The snails shrunk close in
their shells, and resigned themselves to a spongy distance of slime.
The birds might be seen in the morning, hopping over the hollows of
the shrunken ponds, prying for worms, which had shut themselves
up like caddises deep in the thirsty ground. Our lake, which was very
deep at the lower end, became a refuge for all the widgeons and
coots and moorhens of the neighbourhood, and the quick-diving
grebe, and even the summer snipe, with his wild and lonely "cheep."
The brink of the water was feathered, and dabbled with countless
impressions of feet of all sorts--dibbers, and waders, and wagtails,
and weasels, and otters, and foxes, and the bores of a thousand
bills, and muscles laid high and dry.
For my own pet robins I used to fill pans with water along the
edge of the grass, for I knew their dislike of the mineral spring
(which never went dry), and to these they would fly down and drink,
and perk up their impudent heads, and sluice their poor little dusty
wings; and then, as they could not sing now, they would give me a
chirp of gratitude.
When the drought had lasted about three months, the east
wind, which till then had been cold and creeping, became suddenly
parching hot. Arid and heavy, and choking, it panted along the
glades, like a dog on a dusty road. It came down the water-
meadows, where the crowsfoot grew, and wild celery, and it licked
up the dregs of the stream, and powdered the flood-gates, all
skeletons now, with grey dust. It came through the copse, and the
young leaves shrunk before it, like a child from the hiss of a snake.
The blast pushed the doors of our house, and its dry wrinkled hand
was laid on the walls and the staircase and woodwork; a hot grime
tracked its steps, and a taint fell on all that was fresh. As it folded its
baleful wings, and lay down like a desert dragon, vegetation, so long
a time sick, gave way at last to despair, and flagged off flabbed and
dead. The clammy grey dust, like hot sand thrown from ramparts,
ate to the core of everything, choking the shrivelled pores and
stifling the languid breath. Old gaffers were talking of murrain in
cattle, and famine and plague among men, and farmers were too
badly off to grumble.
But the change even now was at hand. The sky which had long
presented a hard and cloudless blue, but trailing a light haze round
its rim in the morning, was bedimmed more every day with a white
scudding vapour across it. The sun grew larger and paler, and leaned
more on the heavens, which soon became ribbed with white
skeleton-clouds; and these in their turn grew softer and deeper, then
furry and ravelled and wisped. One night the hot east wind dropped,
and, next morning (though the vane had not changed), the clouds
drove heavily from the south-west. But these signs of rain grew for
several days before a single drop fell; as is always the case after
discontinuance, it was hard to begin again. Indeed, the sky was
amassed with black clouds, and the dust went swirling like a mat
beaten over the trees, and the air became cold, and the wind
moaned three days and three nights, and yet no rain fell. As old
Whitehead, the man at the lodge, well observed, it had "forgotten
the way to rain." Then it suddenly cleared one morning (the 28th of
May), and the west was streaked with red clouds, that came up to
crow at the sun, and the wind for the time was lulled, and the hills
looked close to my hand. So I went to my father's grave without the
little green watering-pot or a trowel to fill the chinks, for I knew it
would rain that very day.
In the eastern shrubbery there was a pond, which my father
had taken much trouble to make and adorn; it was not fed by the
mineral spring, for that was thought likely to injure the fish, but by a
larger and purer stream, called the "Witches' brook," which,
however, was now quite dry. This pond had been planted around
and through with silver-weed, thrumwort and sun-clew, water-lilies,
arrow-head, and the rare double frog-bit, and other aquatic plants,
some of them brought from a long distance. At one end there was a
grotto, cased with fantastic porous stone, and inside it a small
fountain played. But now the fountain was silent, and the pond
shrunk almost to its centre. The silver eels which once had
abounded here, finding their element likely to fail, made a migration,
one dewy night, overland to the lake below. The fish, in vain envy of
that great enterprise, huddled together in the small wet space which
remained, with their back-fins here and there above water. When
any one came near, they dashed away, as I have seen grey mullet
do in the shallow sea-side pools. Several times I had water poured in
for their benefit, but it was gone again directly. The mud round the
edge of the remnant puddle was baked and cracked, and foul with
an oozy green sludge, the relic of water-weeds.
This little lake, once so clear and pretty, and full of bright
dimples and crystal shadows, now looked so forlorn and wasted and
old, like a bright eye worn dim with years, and the trees stood round
it so faded and wan, the poplar unkempt of its silver and green, the
willow without wherewithal to weep, and the sprays of the birch laid
dead at its feet; altogether it looked so empty and sad and piteous,
that I had been deeply grieved for the sake of him who had loved it.
So, when the sky clouded up again, in the afternoon of that day,
I hastened thither to mark the first effects of the rain.
As I reached the white shell-walk, which loosely girt the pond,
the lead-coloured sky took a greyer and woollier cast, and overhead
became blurred and pulpy; while round the horizon it lifted in frayed
festoons. As I took my seat in the grotto, the big drops began to
patter among the dry leaves, and the globules rolled in the dust, like
parched peas. A long hissing sound ensued, and a cloud of powder
went up, and the trees moved their boughs with a heavy dull sway.
Then broke from the laurels the song of the long-silent thrush, and
reptiles, and insects, and all that could move, darted forth to rejoice
in the freshness. The earth sent forth that smell of sweet newness,
the breath of young nature awaking, which reminds us of milk, and
of clover, of balm, and the smile of a child.
But, most of all, it was in and around the pool that the signs of
new life were stirring. As the circles began to jostle, and the bubbles
sailed closer together, the water, the slime, and the banks, danced,
flickered, and darkened, with a whirl of living creatures. The surface
was brushed, as green corn is flawed by the wind, with the quivering
dip of swallows' wings; and the ripples that raced to the land
splashed over the feet of the wagtails.
Here, as I marked all narrowly, and seemed to rejoice in their
gladness, a sudden new wonder befell me. I was watching a
monster frog emerge from his penthouse of ooze, and lift with some
pride his brown spots and his bright golden throat from the matted
green cake of dry weed, when a quick gleam shot through the
fibres. With a listless curiosity, wondering whether the frog, like his
cousin the toad, were a jeweller, I advanced to the brim of the pool.
The poor frog looked timidly at me with his large starting eyes; then,
shouldering off the green coil, made one rapid spring, and was safe
in the water. But his movement had further disclosed some glittering
object below. Determined to know what it was, despite the rain, I
placed some large pebbles for steps, ran lightly, and lifted the weed.
Before me lay, as bright as if polished that day, with the jewelled hilt
towards me, a long narrow dagger. With a haste too rapid for
thought to keep up, I snatched it, and rushed to the grotto.
There, in the drought of my long revenge, with eyes on fire, and
teeth set hard and dry, and every root of my heart cleaving and
crying to heaven for blood, I pored on that weapon, whose last
sheath had been--how well I knew what. I did not lift it towards
God, nor fall on my knees and make a theatrical vow; for that there
was no necessity. But for the moment my life and my soul seemed to
pass along that cold blade, just as my father's had done. A
treacherous, blue, three-cornered blade, with a point as keen as a
viper's fang, sublustrous like ice in the moonlight, sleuth as hate,
and tenacious as death. To my curdled and fury-struck vision it
seemed to writhe in the gleam of the storm which played along it
like a corpse-candle. I fancied how it had quivered and rung to find
itself deep in that heart.
My passions at length overpowered me, and I lay, how long I
know not, utterly insensible. When I came to myself again, the
storm had passed over, the calm pool covered my stepping stones,
the shrubs and trees wept joy in the moonlight, the nightingales
sang in the elms, healing and beauty were in the air, peace and
content walked abroad on the earth. The May moon slept on the
water before me, and streamed through the grotto arch; but there it
fell cold and ghost-like upon the tool of murder. Over this I hastily
flung my scarf; coward, perhaps I was, for I could not handle it
then, but fled to the house and dreamed in my lonely bed.
When I examined the dagger next day, I found it to be of
foreign fabric. "Ferrati, Bologna," the name and abode of the maker,
as I supposed, was damascened on the hilt. A cross, like that on the
footprint, but smaller, and made of gold, was inlaid on the blade,
just above the handle. The hilt itself was wreathed with a snake of
green enamel, having garnet eyes. From the fine temper of the
metal, or some annealing process, it showed not a stain of rust, and
the blood which remained after writing the letters before described
had probably been washed off by the water. I laid it most carefully
by, along with my other relics, in a box which I always kept locked.
So God, as I thought, by His sun, and His seasons, and weather,
and the mind He had so prepared, was holding the clue for me, and
shaking it clear from time to time, along my dark and many-winding
path.

CHAPTER VIII.
Soon after this, a ridiculous thing occurred, the consequences of
which were grave enough. The summer and autumn after that
weary drought were rather wet and stormy. One night towards the
end of October, it blew a heavy gale after torrents of rain. Going to
the churchyard next day, I found, as I had expected, that the flowers
so carefully kept through the summer were shattered and strewn by
the tempest; and so I returned to the garden for others to plant in
their stead. My cousin Clement (as he was told to call himself) came
sauntering towards me among the beds. His usual look of shallow
brightness and empty self-esteem had failed him for the moment,
and he looked like a fan-tailed pigeon who has tumbled down the
horse-rack. He followed me to and fro, with a sort of stuttering walk,
as I chose the plants I liked best; but I took little notice of him, for
such had been my course since I first discovered their scheme.
At last, as I stooped to dig up a white verbena, he came behind
me, and began his errand with more than his usual lisp. This I shall
not copy, as it is not worth the trouble.
"Oh, Clara," he said, "I want to tell you something, if you'll only
be good-natured!"
"Don't you see I am busy now?" I replied, without turning to
look. "Won't it do when you have taken your curl-papers off?"
"Now, Clara, you know that I never use curl-papers. My hair
doesn't want it. You know it's much prettier than your long waving
black stuff, and it curls of its own accord, if mamma only brushes it.
But I want to tell you something particular."
"Well, then, be quick, for I am going away." And with that I
stood up and confronted him. He was scarcely so tall as myself, and
his light showy dress and pink rose of a face, which seemed made to
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy