Codecademy Practice

Mad Lab part 1

Challenge: Create a text that updates a number in a sentence with another random number as you refresh the browser. Every time you refresh the browser, you will see the same sentence, but that number would have been replaced with another random one.

Things you'll practice: targeting and manipulating HTML elements from JS, String concatenation, JS libraries like Math, GIT branches.

Example:

I am 8 years old.

(refresh browser)

I am 156 years old.

(refresh browser)

I am 23 years old.

etc.

Step by step instructions:

HTML

Use whatever HTML element of your choice to display the sentence, a div, a p, etc.

CSS

You are free to style and layout things as you please.

JS

GIT

Work on a branch for this challenge.

DEBUGGING

EXTRA

Do this if you want to, but it's not needed for the challenge:

At the end of your JS file, print the output sentence to the console using console.log(). Then, in your browser, load the developer tools and click on the console tab. What do you see in the console tab when you refresh the browser?