Update the provided code to
perform the following actions:
- Save the heading with id
welcome
in a variable named mainHeading
.
- Save the heading with id
punchline
in a variable named punchline
.
- Save all the
h2
tags in a variable
named headings
as an Array.
- Log
mainHeading
, punchline
and
headings
to the console.
We are not displaying the answer for this exercise.
We do this because we want you to challenge yourself
and
not give in to the temptation of looking at the solution.
We also don't want to leave you stuck, so if you feel
you have tried enough and are still unable to solve
this exercise, feel free to ask in our community.
Here is the link to join the community.