Can you spot any variance between these two instances:
const elements = document.querySelectorAll('.someclass');
for(const element of elements){
// perform an action
}
versus
for(const element of document.querySelectorAll('.someclass')){
// perform an action
}
Is the function re-invoked on each iteration? Or is the distinction solely in the syntax?