Suppose you have a routine like the following to wire up click event handlers
getElements(\".board>div\").forEach(function(elem){ elem.addEventListener(\"cl
Why don't you just bind the function with the object?
getElements(".board>div").forEach(function(elem){ elem.addEventListener("click", handleClick.bind(elem)); });