Using this code:
addDefaultComments() {
$('.image').each((index, image) => {
Comment.defaults.forEach((comment) => {
debugger;
$('#images').find(`ul[data-id=${imageId}] ul#comments-${imageId}`).append(`<li>${comment.commentContent}</li>\n`);
})
})
}
At this debugger
statement, shouldn't I have access to image and index? When I call them, it says they aren't defined. Isn't that weird?
Proof that something odd is going on: