Show a message when two or more random numbers match
Use JavaScript to show a message when some numbers match.
Now that your page has three different random numbers, sometimes they’ll match. Write some JavaScript that checks if any of numbers match.
Highlighting
Highlight the numbers that are the matching ones by
- using JS to add a class (for example,
highlight
) to the correctdiv
s in the HTML; - adding styles in your CSS file that use your new class(es) (try changing the
color
,background-color
,border
, and more!).
For adding and removing classes, have a look at:
Messaging
Display a message under the numbers that says
- what the matched numbers were;
- how many matches there were.
Add files and push them to GitHub
To add all the files that have changed at once, you can use:
git add .