So I am doing a school assignment where im tasked to write an event listener that makes a tag for a value. and show as a Html (but should it just show up in the console or what is meant by HTML?)
and also add a button to it which removes the tag
This is what I have:
const textInput = document.querySelector("input");
function callAfterAKeyIsReleased(event) {
console.log("<div>", "Number" + event.target.value, "</div>");
};
textInput.addEventListener("keyup", callAfterAKeyIsReleased);
<main class="container content dynamic">
<input type="number" value="0" min="0" max="20" />
<div class="dynamic-divs"></div>
<button class="reset" type="button">Reset</button>
</main>
but I am 100% sure that is a cheat though