Hello, I have the following html code:
<nav id="myNav" class="nav has-shadow">
<div class="nav-center">
<a class="nav-item is-tab is-active">Ingresos</a>
<a class="nav-item"><h1 id="myTitle" class="title">Letor</h1></a>
<a class="nav-item is-tab">Gastos</a>
</div>
</nav>
and the next js:
function startMenu(){
let menuButtons = document.getElementsByClassName('is-tab');
for(let i=0; i<menuButtons.length;i++ )
menuButtons[i].addEventListener('click',()=>{
console.log(this);
});
}
Is there a way to access this
from the callback or do I necessarily have to add a parameter in the function to find the target
?