Ad
Code
Diff
  • const rps = (p, z) => 
      p == z ? 'Draw!' : `Player ${1 + /sr|ps|rp/.test(p[0] + z[0])} won!`;
    
    • const rps=(p,z)=>p==z?'Draw!':`Player ${1+/sr|ps|rp/.test(p[0]+z[0])} won!`;
    • const rps = (p, z) =>
    • p == z ? 'Draw!' : `Player ${1 + /sr|ps|rp/.test(p[0] + z[0])} won!`;