I have button and want to add EventListener to this button. Question is: what is the best way to code it?
v1:
let BackBtn = document.querySelector('.back');
BackBtn.addEventListener('click', load_from_breackpoint);
v2:
document.querySelector('.back').addEventListener('click', load_from_breackpoint);
Note: BackBtn dont used in code bellow. In my project so much buttons like this and may it affect performance if I use v1 for 30 buttons?