This function adds a new paragraph saying "New click" to an empty div on the page. I came up with this function when I was trying to figure out how to log button interactions. I looked up how to incoprate tags into code blocks without it being interpreted by the HTML, and I found out that I could use symbol codes to substitute tag markings such as '<'.
Test out the function here
function clicked(){
document.querySelector('div').innerHTML += '<p>New click</p>';
}
const clicked = function(){
document.querySelector('div').innerHTML += '<p>New click</p>';
}
const clicked = () => document.querySelector('div').innerHTML += '<p>New click</p>';