I'm trying to pass a variable from an addEventListener function to another. How could you pass a variable if both of the functions don't have a name? Thank you!
document.getElementById('rect').addEventListener('keyup', function() {
var index = 5;
}
document.getElementById('rte').addEventListener('click', function() {
}