These commands are a helpful quick start. You may choose to ignore them completely and create your own directory structure. If you choose to use this recommendation, just copy the commands below. It doesn't matter what directory you are currently in.
mkdir -p ~/workspace/exercises/the-static-web/sonnet && cd $_
touch index.html
touch sonnet.js
- Paste the code below into your HTML file.
- Take the contents of the sonnet div and place it in a variable.
- Find and output the starting position of the word "orphans".
- Output the number of characters in the sonnet.
- Replace the first occurance of the string "winter" with "yuletide".
- Replace all occurances of the string "the" with "a large".
- Set the content of the sonnet div with the new string.
<div id="sonnet">
How like a winter hath my absence been
From thee, the pleasure of the fleeting year!
What freezings have I felt, what dark days seen!
What old December's bareness everywhere!
And yet this time removed was summer's time;
The teeming autumn, big with rich increase,
Bearing the wanton burden of the prime,
Like widow'd wombs after their lords' decease:
Yet this abundant issue seemed to me
But hope of orphans, and unfathered fruit;
For summer and his pleasures wait on thee,
And, thou away, the very birds are mute:
Or, if they sing, 'tis with so dull a cheer,
That leaves look pale, dreading the winter's near.
</div>