Could be rewritten to ``eventIds.forEach(register);``