innerHtml
method to insert HTML into a div
.<br/>
to create the new lines of the figure.drawEmoji
function that re-uses our code to draw emojis, that receives an emoji type as input.drawEmoji
inside an anonymous function because we only want drawEmoji
to run when the click event happens. The following code would not work because drawEmoji
would be called when the JS file loads, and not on click.