Question: How to write a code using Javascript, we taught(span, if, script, var, function ) Create a webpage Task3.html and on the webpage display: - A

How to write a code using Javascript, we taught(span, if, script, var, function )
 

Create a webpage Task3.html and on the webpage display:
- A button "Add emoji"

Whenever the user clicks the button "Add emoji", one more emoji will be added to the webpage:
- when user clicks "Add emoji" the first time, display one flower emoji;
- if the user clicks "Add emoji" again, display two emojis: flower and smiling face;
- if the user clicks "Add emoji" again, display three emojis: flower, smiling face and flower;
- if the user clicks "Add emoji" again, display four emojis: flower, smiling face, flower and smiling face; and the pattern keeps going like this.

Step by Step Solution

3.45 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Emoji Display Add emoji Function to add an emoji to the container function addEmoji const emoj... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!