Professional Documents
Culture Documents
Building React Apps With Server Side Rendering Use React Redux and Next To Build Full Server Side Rendering Applications Thakkar Mohit
Building React Apps With Server Side Rendering Use React Redux and Next To Build Full Server Side Rendering Applications Thakkar Mohit
https://textbookfull.com/product/building-react-apps-with-server-
side-rendering-use-react-redux-and-next-to-build-full-server-
side-rendering-applications-thakkar-mohit-2/
https://textbookfull.com/product/exploring-blazor-creating-
hosted-server-side-and-client-side-applications-with-c-taurius-
litvinavicius/
https://textbookfull.com/product/programming-kotlin-applications-
building-mobile-and-server-side-applications-with-kotlin-1st-
edition-brett-mclaughlin/
https://textbookfull.com/product/react-quickly-painless-web-apps-
with-react-jsx-redux-and-graphql-1st-edition-azat-mardan/
Server Side Swift with Vapor Building Web APIs and Web
Apps in Swift 3rd Edition Raywenderlich.Com Tutorial
Team
https://textbookfull.com/product/server-side-swift-with-vapor-
building-web-apis-and-web-apps-in-swift-3rd-edition-
raywenderlich-com-tutorial-team/
https://textbookfull.com/product/server-side-swift-paul-hudson/
https://textbookfull.com/product/learning-react-a-hands-on-guide-
to-building-web-applications-using-react-and-redux-2nd-edition-
kirupa-chinnathambi/
https://textbookfull.com/product/practical-react-native-build-
two-full-projects-and-one-full-game-using-react-native-1st-
edition-frank-zammetti/
https://textbookfull.com/product/node-js-design-patterns-master-
best-practices-to-build-modular-and-scalable-server-side-web-
applications-2nd-edition-casciaro/
Mohit Thakkar
Trademarked names, logos, and images may appear in this book. Rather
than use a trademark symbol with every occurrence of a trademarked
name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark. The use in this publication
of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of
opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the authors nor the
editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained
herein.
1. JavaScript Prerequisites
Mohit Thakkar1
(1) Vadodara, Gujarat, India
Introduction to JavaScript
JavaScript is one of the most popular languages for web development,
and it is essential to learn this language in order to create applications
that run on web browsers. Apart from web applications, JavaScript can
also be used to create desktop, mobile, as well as server-side
applications using various frameworks like Meteor, React Native, and
Node.js. However, we will focus on web applications for the scope of
this chapter.
JavaScript was created by Brendan Eich in the year 1995 and was
standardized by ECMA (European Computer Manufacturers
Association) in 1997. As a result, JavaScript is also known as
ECMAScript (ES) . As the web browsers developed over time, so did
JavaScript with the release of ES3 in 1999, ES5 in 2009, and ES6 in
2015. After ES6, there have been minor updates to JavaScript every
year, but ES6 is by far the latest major release.
Let us now set up our development environment so that we can
begin with practical examples on JavaScript programming.
<html>
<head>
<title>intro-to-js</title>
<link rel="stylesheet" type="text/css"
href="css/style.css"></script>
</head>
<body>
<h1>Introduction to JavaScript</h1>
<hr/>
<div id="ResultContainer"></div>
<script type="text/javascript"
src="scripts/index.js"></script>
</body>
</html>
var ResultContainer =
document.getElementById("ResultContainer");
body{
margin-top:20px;
margin-left:20px;
}
h1{
font-size:50px;
}
#ResultContainer{
margin-top:30px;
padding:10px;
width:450px;
height:200px;
border:1px solid black;
font-size:30px;
}
Now let us run our project and see the output. Visual Studio Code
does not have a built-in method to run HTML files in browser. Hence,
we will have to do some configurations to run our project. Check the
documentation for the editor that you are using to find help on launch
configurations. If you are using Visual Studio Code, the following steps
should help you get started:
1. Press Ctrl+Shift+P to open the Command Palette.
{
"version": "2.0.0",
"command": "Chrome",
"windows": {
"command": "C:\\Program Files
(x86)\\Google\\Chrome\\Application\\chrome.exe"
},
"args": ["${file}"],
"group": {
"kind": "build",
"isDefault": true
}
}
...
if(true){
let letVariable = "Variable using let";
}
ResultContainer.innerHTML = letVariable;
If you try to execute the preceding piece of code, you might get an
error in the console stating that “letVariable is not defined”. This is
because you are trying to access letVariable outside its scope. Change
the code to the following and you should see the output similar to
Figure 1-4:
...
if(true){
var varVariable = "Variable using var";
}
ResultContainer.innerHTML = varVariable;
Rest Parameter
Rest parameter is a feature of JavaScript that was introduced in ES6. It
lets us handle multiple function input parameters as an array. It is
particularly helpful in scenarios where the number of input parameters
to a function is indefinite.
...
function sum(...inputs) {
var result = 0;
for(let i of inputs){
result += i;
}
return result;
}
ResultContainer.innerHTML = sum(5, 10, 5, 5);
This should give you an output of “25” on your HTML template. Now
let us understand what is happening here. When we declare a function
with rest parameter and invoke it, JavaScript automatically takes in all
the arguments we pass to the function and clubs it into an array. The
function can then iterate through the array and perform operations on
all the input elements supplied. Rest parameter can also be used with
regular parameters. However, rest parameter should always be the last
argument so that JavaScript can collect all the remaining elements and
club it into an array. Consider the following example:
...
function sum(input1, input2, ...remainingInputs) {
var result = input1 + input2;
for(let i of remainingInputs){
result += i;
}
return result;
}
ResultContainer.innerHTML = sum(5, 10, 5, 5);
The preceding piece of code will also give you an output of “25” on
your HTML template. The only difference here is that only the last two
input parameters will be considered as rest parameters, whereas the
first two are regular parameters. One of the major benefits of rest
parameter is that array operations such as filter, sort, pop, push,
reverse, and so on can easily be performed on input parameters.
...
let fruits = ['Apple', 'Watermelon', 'Grapes'];
let [fruit1, fruit2, fruit3] = fruits;
ResultContainer.innerHTML = fruit2;
The preceding piece of code will give you “Watermelon” as output.
This is because when we use destructuring syntax (variables in square
brackets separated by commas on left and an array or object on right),
JavaScript automatically extracts values from the array on the right-
hand side and starts assigning them to the variables on the left-hand
side. Note that the values are assigned from left to right. So, for
instance, if there are two variables on the left-hand side and four array
elements on the right-hand side, then the first two values from the
array will be assigned to the variables and the last two values will be
left out. On the contrary, if there are four variables on the left-hand side
and just two array elements on the right-hand side, the values will be
assigned to the first two variables and the last two variables will be
undefined.
We can also skip some array elements while assigning it to
variables. To do so, add an extra comma separator on the left-hand side.
Consider the following example:
...
let fruits = ['Apple', 'Watermelon', 'Grapes'];
let [fruit1, , fruit2] = fruits;
ResultContainer.innerHTML = fruit2;
This time, the output that will be displayed on your HTML template
will be “Grapes”. This is because when JavaScript tries to find the
second variable for assigning second array element, it finds a null entry
because of the comma separator and skips that particular array
element. Another interesting thing you can do with destructuring is
that you can assign first few array elements to separate variables and
assign remaining array elements to a single variable using the rest
parameter syntax. Have a look at the following example to get a better
understanding:
...
let fruits = ['Apple', 'Watermelon', 'Grapes',
'Guava'];
let [fruit1, ...OtherFruits] = fruits;
ResultContainer.innerHTML = OtherFruits;
The preceding piece of code will give you “Watermelon, Grapes,
Guava” as output because the rest parameter syntax will assign all the
remaining array elements to the “OtherFruits” variable.
Objects can be destructured in a similar way to arrays with the only
exception being the use of curly brackets instead of square brackets on
the left-hand side to specify variables. Consider the following example
of destructuring object:
...
let Fruits = {Fruit1: 'Apple', Fruit2:
'Watermelon'};
let {Fruit1, Fruit2} = Fruits;
ResultContainer.innerHTML = Fruit1;
The preceding piece of code will give you “Apple” as output. Let us
now try to use destructuring in functions. We will try to pass an array
as input parameter and destructure it in the function definition. Please
look at the following piece of code:
...
function sum(a, b, c){
return a+b+c;
}
Control Loops
JavaScript provides multiple ways to iterate through loops. Let us look
at each one of them with examples.
for
The for loop takes in three parameters: the first parameter is for the
initialization of the control variable, the second one is the condition
that provides entry to the loop if true, and the last one is increment or
decrement parameter that will modify the value of control variable in
each loop. These three parameters are followed by the body of the loop:
...
for(let i=0;i<8;i++){
if(i==1){
continue;
}
console.log("i: " + i);
if(i==4){
break;
}
}
We can use break and continue operators with all kinds of
JavaScript loops. The continue operator is used to skip the remaining
statements from the body of the loop and skip to the next iteration,
whereas the break operator is used to terminate all the remaining
iterations of the loop.
Notice the preceding piece of code and its output in Figure 1-6. The
loop is conditioned to run for eight iterations and print the number of
iteration in each execution. However, for the second iteration, the if
condition before the print statement in the body of the loop will
evaluate to true and the execution of continue operator will make the
loop jump to the next iteration. Hence, we do not see the value “1” in
the output. Similarly, for the fifth iteration, the if condition after the
print statement will evaluate to true and the execution of break
operator will terminate the remaining iterations of the loop. Thus, we
do not see remaining values after “4” printed in the output.
forEach
forEach loop is called on an array or a list and executes a function for
each array element. The function takes in three parameters: the current
value (fruit), the index of the current value (index), and the array object
that the current value belongs to. The second and third parameters are
optional, whereas the first parameter is mandatory. One of the major
benefits of using this control loop is that the function would not be
executed for empty array elements, which results in better response
time for the end application:
...
let fruits = ['Apple','Grapes','Watermelon'];
fruits.forEach((fruit, index) => {
console.log(index + ': ' + fruit);
})
while
while loop is an entry-controlled loop similar to for loop, which means
that the condition that validates the entry to the loop is checked during
the beginning of the iteration. However, unlike for loop, you don’t have
to initialize or modify the control variable along with the condition. The
initialization is done before the beginning of the loop and its value is
modified in the loop body:
...
let fruits = ['Apple', 'Grapes', 'Watermelon'];
let i = 0;
while (i < fruits.length) {
console.log(i + ': ' + fruits[i]);
i++;
}
do...while
do...while loop is a variation of the while loop which is exit-controlled,
which means that the condition that validates the entry to the loop is
checked after the completion of an iteration. If true, the loop will
execute the next iteration:
...
let fruits = ['Apple', 'Grapes', 'Watermelon'];
Another random document with
no related content on Scribd:
The small boy knelt at his mother’s bedside, his little face against
hers. Softly he kissed the pale cheek. The boy’s heart had become a
man’s. He tried by touch and look to speak his love, his sympathy,
his admiration. His mother smiled at him as she soothed the baby,
glad to be free from pain. But presently the shouts and disorder of
the departing townspeople reached her ears. She stirred uneasily.
Fear crept into her eyes. Passionately she strained her little one to
her.
“How soon, little son, how soon?”
The lad, absorbed in his mother, had forgotten the Germans. With
a start he realized the danger. His new-born manhood took
command. His father was at the front. He must protect his mother
and tiny sister. His mother was too ill to move, but they ought to get
away. Who had a wagon? He hurried to the window, but already
even the stragglers were far down the road. All but three of the
horses had been sent to the front. Those three were now out of sight
with their overloaded wagons. The boy stood stupefied and helpless.
The woman on the bed stirred.
“My son,” she called. “My son!”
He went to her.
“You must leave me and go on.”
“I can’t, mother.”
The woman drew the boy down beside her. She knew the struggle
to come. How could she make him understand that his life and the
baby’s meant more to her than her own? Lovingly she stroked the
soft cheek. It was a grave, determined little face with very steady
eyes.
“Son, dear, think of little sister. The Germans won’t bother with
babies. There isn’t any milk. Mother hasn’t any for her. You must
take baby in your strong little arms and run—run with her right out of
this land into Holland.”
But he could not be persuaded. The mother understood that love
and a sense of duty held him. She gathered the baby in her arms
and tried to rise, but the overtaxed heart failed, and she fell back
half-fainting. The boy brought water and bathed her head until the
tired eyes opened.
“Little son, it will kill mother if you don’t go.”
The boy’s shoulders shook. He knelt by the bed. A sob broke from
him. Then there came the faint, far-distant call of the bugle.
Frantically the mother gathered up her baby and held it out to the
boy.
“For mother’s sake, son, for mother.”
In a flash the boy understood. His mother had risked her life for
the tiny sister. She wanted the baby saved more than anything else
in the world. He dashed the tears from his eyes. He wound his arms
about his mother in a long, passionate embrace.
“I’ll take her, mother; I’ll get her there safely.”
The bugle grew louder. Through the open window on the far-
distant road could be seen a cloud of dust. There was not a moment
to lose. Stooping, the boy caught up the red, squirming baby. Very
tenderly he placed the little body against his breast and buttoned his
coat over his burden.
The sound of marching feet could now be heard. Swiftly he ran to
the door. As he reached the threshold he turned. His mother, her
eyes shining with love and hope, was waving a last good-by. Down
the stairs, out of the back door, and across the fields sped the child.
Over grass and across streams flew the sure little feet. His heart
tugged fiercely to go back, but that look in his mother’s face
sustained him.
He knew the road to Holland. It was straight to the north; but he
kept to the fields. He didn’t want the baby discovered. Mile after mile,
through hour after hour, he pushed on, until twilight came. He found
a little spring and drank thirstily. Then he moistened the baby’s
mouth. The little creature was very good. Occasionally she uttered a
feeble cry, but most of the time she slept. The boy was intensely
weary. His feet ached. He sat down under a great tree and leaned
against it. Was it right to keep a baby out all night? Ought he to go to
some farmhouse? If he did, would the people take baby away? His
mother had said, “Run straight to Holland.” But Holland was twenty
miles away. He opened his coat and looked at the tiny creature. She
slept peacefully.
The night was very warm. He decided to remain where he was. It
had grown dark. The trees and bushes loomed big. His heart beat
quickly. He was glad of the warm, soft, live little creature in his arms.
He had come on this journey for his mother, but suddenly his boy’s
heart opened to the tiny, clinging thing at his breast. His little hand
stroked the baby tenderly. Then he stooped, and softly his lips
touched the red, wrinkled face. Presently his little body relaxed, and
he slept. He had walked eight miles. Through the long night the deep
sleep of exhaustion held him. He lay quite motionless, head and
shoulders resting against the tree-trunk, and the new-born babe
enveloped in the warmth of his body and arms slept also. The feeble
cry of the child woke him. The sun was coming over the horizon and
the air was alive with the twitter of birds.
At first he thought he was at home and had awakened to a long
happy summer’s day. Then the fretful little cries brought back
memory with a rush. His new-born love flooded him. Tenderly he laid
the little sister down. Stretching his stiff and aching body, he hurried
for water. Very carefully he put a few drops in the little mouth and wet
the baby’s lips with his little brown finger. This proved soothing and
the cries ceased. The tug of the baby’s lips on his finger clutched his
heart. The helpless little thing was hungry, and he too was
desperately hungry. What should he do? His mother had spoken of
milk. He must get milk. Again he gathered up his burden and
buttoned his coat. From the rising ground on which he stood he
could see a farmhouse with smoke issuing from its chimney. He
hurried down to the friendly open door. A kind woman gave him food.
She recognized him as a little refugee bound for Holland. He had
difficulty in concealing the baby, but fortunately she did not cry. The
woman saw that he carried something, but when he asked for milk
she concluded he had a pet kitten. He accepted this explanation.
Eagerly he took the coveted milk and started on.
But day-old babies do not know how to drink. When he dropped
milk into the baby’s mouth she choked and sputtered. He had to be
content with moistening her mouth and giving her a milk-soaked
finger.
Refreshed by sleep and food, the boy set off briskly. Holland did
not now seem so far off. If only his mother were safe! Had the
Germans been good to her? These thoughts pursued and tormented
him. As before, he kept off the beaten track, making his way through
open meadows and patches of trees. But as the day advanced, the
heat grew intense. His feet ached, his arms ached, and, worst of all,
the baby cried fretfully.
At noon he came to a little brook sheltered by trees. He sat down
on the bank and dangled his swollen feet in the cool, fresh stream.
But his tiny sister still cried. Suddenly a thought came to him. Placing
the baby on his knees, he undid the towel that enveloped her. There
had been no time for clothes. Then he dipped a dirty pocket-
handkerchief in the brook and gently sponged the hot, restless little
body. Very tenderly he washed the little arms and legs. That
successfully accomplished, he turned the tiny creature and bathed
the small back. Evidently this was the proper treatment, for the baby
grew quiet. His heart swelled with pride. Reverently he wrapped the
towel around the naked little one and, administering a few drops of
milk, again went on.
All through that long, hot afternoon he toiled. His footsteps grew
slower and slower; he covered diminishing distances. Frequently he
stopped to rest, and now the baby had begun again to cry fitfully. At
one time his strength failed. Then he placed the baby under a tree
and rising on his knees uttered a prayer:
“O God, she’s such a little thing, help me to get her there.”
Like a benediction came the cool breeze of the sunset hour,
bringing renewed strength.
BROWN WOLF
By Jack London
The Klondiker’s face took on a contemptuous expression as he
said finally, “I reckon there’s nothin’ in sight to prevent me takin’ the
dog right here an’ now.”
Walt’s face reddened, and the striking-muscles of his arms and
shoulders seemed to stiffen and grow tense. His wife fluttered
apprehensively into the breach.
“Maybe Mr. Miller is right,” she said. “I’m afraid that he is. Wolf
does seem to know him, and certainly he answers to the name of
Brown. He made friends with him instantly, and you know that’s
something he never did with anybody before. Besides, look at the
way he barked. He was bursting with joy. Joy over what? Without
doubt at finding Mr. Miller.”
Walt’s striking-muscles relaxed, and his shoulders seemed to
droop with hopelessness.
“I guess you’re right, Madge,” he said. “Wolf isn’t Wolf, but Brown,
and he must belong to Mr. Miller.”
“Perhaps Mr. Miller will sell him?” she suggested. “We can buy
him.”
Skiff Miller shook his head, no longer belligerent, but kindly, quick
to be generous in response to generousness.
“I had five dogs,” he said, casting about for the easiest way to
temper his refusal. “He was the leader. They was the crack team of
Alaska. Nothin’ could touch ’em. In 1898 I refused five thousand
dollars for the bunch. Dogs was high then anyway; but that wasn’t
what made the fancy price. It was the team itself. Brown was the
best in the team. That winter I refused twelve hundred for him. I
didn’t sell ’m then an’ I ain’t a-sellin’ ’m now. Besides, I think a mighty
lot of that dog. I’ve ben lookin’ for ’m for three years. It made me fair
sick when I found he’d ben stole—not the value of him, but the—
well, I liked ’m. I couldn’t believe my eyes when I seen ’m just now. I
thought I was dreamin’. It was too good to be true. Why, I was his
wet-nurse. I put ’m to bed, snug every night. His mother died, and I
brought ’m up on condensed milk at two dollars a can when I
couldn’t afford it in my own coffee. He never knew any mother but
me.”
Madge began to speak:
“But the dog,” she said. “You haven’t considered the dog.”
Skiff Miller looked puzzled.
“Have you thought about him?” she asked.
“Don’t know what you’re drivin’ at,” was the response.
“Maybe the dog has some choice in the matter,” Madge went on.
“Maybe he has his likes and desires. You have not considered him.
You give him no choice. It had never entered your mind that possibly
he might prefer California to Alaska. You consider only what you like.
You do with him as you would with a sack of potatoes or a bale of
hay.”
This was a new way of looking at it, and Miller was visibly
impressed as he debated it in his mind. Madge took advantage of his
indecision.
“If you really love him, what would be happiness to him would be
your happiness also,” she urged.
Skiff Miller continued to debate with himself, and Madge stole a
glance of exultation to her husband, who looked back warm
approval.
“What do you think?” the Klondiker suddenly demanded.
It was her turn to be puzzled. “What do you mean?” she asked.
“D’ye think he’d sooner stay in California?”
She nodded her head with positiveness. “I’m sure of it.”
Skiff Miller again debated with himself, though this time aloud, at
the same time running his gaze in a judicial way over the mooted
animal.
“He was a good worker. He’s done a heap of work for me. He
never loafed on me, an’ he was a joe-dandy at hammerin’ a raw
team into shape. He’s got a head on him. He can do everything but
talk. He knows what you say to him. Look at ’m now. He knows we’re
talkin’ about him.”
The dog was lying at Skiff Miller’s feet, head close down on paws,
ears erect and listening, and eyes that were quick and eager to
follow the sound of speech as it fell from the lips of first one and then
the other.
“An’ there’s a lot of work in ’m yet. He’s good for years to come.
An’ I do like him.”
Once or twice after that Skiff Miller opened his mouth and closed it
again without speaking. Finally he said:
“I’ll tell you what I’ll do. Your remarks, ma’am, has some weight in
them. The dog’s worked hard, and maybe he’s earned a soft berth
an’ has got a right to choose. Anyway, we’ll leave it up to him.
Whatever he says goes. You people stay right here settin’ down; I’ll
say ‘good-by’ and walk off casual-like. If he wants to stay, he can
stay. If he wants to come with me, let ’m come. I won’t call ’m to
come an’ don’t you call ’m to come back.”
He looked with sudden suspicion at Madge, and added, “Only you
must play fair. No persuadin’ after my back is turned.”
“We’ll play fair,” Madge began, but Skiff Miller broke in on her
assurances.
“I know the ways of women,” he announced. “Their hearts is soft.
When their hearts is touched they’re likely to stack the cards, look at
the bottom of the deck, an’ lie—beggin’ your pardon, ma’am—I’m
only discoursin’ about women in general.”
“I don’t know how to thank you,” Madge quavered.
“I don’t see as you’ve got any call to thank me,” he replied; “Brown
ain’t decided yet. Now, you won’t mind if I go away slow. It’s no
more’n fair, seein’ I’ll be out of sight inside a hundred yards.”
Madge agreed and added, “And I promise you faithfully that we
won’t do anything to influence him.”
“Well, then, I might as well be gettin’ along,” Skiff Miller said, in the
ordinary tones of one departing.
At this change in his voice Wolf lifted his head quickly, and still
more quickly got to his feet when the man and woman shook hands.
He sprang up on his hind legs, resting his fore-paws on her hip and
at the same time licking Skiff Miller’s hand. When the latter shook
hands with Walt, Wolf repeated his act, resting his weight on Walt
and licking both men’s hands.
“It ain’t no picnic, I can tell you that,” were the Klondiker’s last
words, as he turned and went slowly up the trail.
For the distance of twenty feet Wolf watched him go, himself all
eagerness and expectancy, as though waiting for the man to turn
and retrace his steps. Then, with a quick, low whine, Wolf sprang
after him, overtook him, caught his hand between his teeth with
reluctant tenderness and strove gently to make him pause.
Failing in this, Wolf raced back to where Walt Irvine sat, catching
his coat-sleeve in his teeth and trying vainly to drag him after the
retreating man.
Wolf’s perturbation began to wax. He desired ubiquity. He wanted
to be in two places at the same time, with the old master and the
new, and steadily the distance was increasing. He sprang about
excitedly, making short, nervous leaps and twists, now toward one,
now toward the other, in painful indecision, not knowing his own
mind, desiring both and unable to choose, uttering quick, sharp
whines and beginning to pant.
He sat down abruptly on his haunches, thrusting his nose upward,
his mouth opening and closing with jerky movements, each time
opening wider. The jerking movements were in unison with the
recurrent spasms that attacked the throat, each spasm severer and
more intense than the preceding one. And in accord with jerks and
spasms the larynx began to vibrate, at first silently, accompanied by
the rush of air expelled from the lungs, then sounding a low, deep
note, the lowest in the register of the human ear. All this was the
nervous and muscular preliminary to howling.
But just as the howl was on the verge of bursting from the full
throat, the wide open mouth was closed, the paroxysms ceased, and
he looked long and steadily at the retreating man. Suddenly Wolf
turned his head, and over his shoulder just as steadily regarded
Walt. The appeal was unanswered. Not a word nor a sign did the
dog receive, no suggestion and no clew as to what his conduct
should be.
A glance ahead to where the old master was nearing the curve of
the trail excited him again. He sprang to his feet with a whine, and
then, struck by a new idea, turned his attention to Madge. Hitherto
he had ignored her, but now, both masters failing him, she alone was
left. He went over to her and snuggled his head in her lap, nudging
her arm with his nose—an old trick of his when begging for favors.
He backed away from her and began writhing and twisting playfully,
curveting and prancing, half rearing and striking his fore-paws to the
earth, struggling with all his body, from the wheedling eyes and
flattening ears to the wagging tail, to express the thought that was in
him and that was denied him utterance.
This too he soon abandoned. He was depressed by the coldness
of these humans who had never been cold before. No response
could he draw from them, no help could he get. They did not
consider him. They were as dead.
He turned and silently gazed after the old master. Skiff Miller was
rounding the curve. In a moment he would be gone from view. Yet he
never turned his head, plodding straight onward; slowly and
methodically, as though possessed of no interest in what was
occurring behind his back.
And in this fashion he went out of view. Wolf waited for him to
reappear. He waited a long minute, quietly, silently without
movement as though turned to stone—withal stone quick with
eagerness and desire. He barked once, and waited. Then he turned
and trotted back to Walt Irvine. He sniffed his hand and dropped
down heavily at his feet, watching the trail where it curved emptily
from view.
The tiny stream slipping down the mossy-lipped stone seemed
suddenly to increase the volume of its gurgling noise. Save for the
meadow larks, there was no other sound. The great yellow butterflies
drifted silently through the sunshine and lost themselves in the
drowsy shadows. Madge gazed triumphantly at her husband.
A few minutes later Wolf got upon his feet. Decision and
deliberation marked his movements. He did not glance at the man
and woman. His eyes were fixed up the trail. He had made up his
mind. They knew it. And they knew, so far as they were concerned,
that the ordeal had just begun.
He broke into a trot and Madge’s lips pursed, forming an avenue
for the caressing sound that it was the will of her to send forth. But
the caressing sound was not made. She was impelled to look at her
husband, and she saw the sternness with which he watched her. The
pursed lips relaxed, and she sighed inaudibly.
Wolf’s trot broke into a run. Wider and wider were the leaps he
made. Not once did he turn his head, his wolf’s brush standing out
straight behind him. He cut sharply across the curve of the trail and
was gone.—From “Love of Life,” copyrighted by The Macmillan Co.,
New York, and used by their kind permission.