attached my solution (TennisGameMorenoNir.js)