Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function initializeCounterComponent(container) {
var boton = container.querySelector("#counterClick");
var title = container.querySelector("h1");
if (boton) {
boton.addEventListener("click", (e) => {
console.log("click JavaScript");
let button =;
button.innerHTML = "Hello";
title.innerHTML = "The button has been clicked!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment