Javscript foreach con Click Listener

var postBoxes = document.querySelectorAll('.post-box')
postBoxes.forEach(function(postBox) {

  postBox.addEventListener('click', function() {
    var postId = this.getAttribute('post-id')
  console.log(postId)
    document.getElementById('comment-form-' + postId).style.display = 'block'
  })
})
Lively Lobster