So what I want to do is console.log a specific element of my array of three nodes.
const sentinel = document.querySelectorAll('.sentinel');
sentinel.forEach(function(element, index){
setInterval(function(element) {
if(index === 0){
console.log(element);
}
}, 3000);
});
I've googled, and I've found this post: Get a specific element within forEach loop, which does ask the same question. However, when I console log the element I expect to get the node on the 0 index. However, I get a null element.