Pong in JavaScript (using ES6)