fork download
  1. // your code goes here
  2. function beepodd(s) {
  3. let rep = s.replace(/\b\d*[13579]\b/g, "BEEP");
  4. return rep;
  5. }
  6.  
  7. console.log(beepodd("I have 12 cars, 11 of which are 89 years old"))
Success #stdin #stdout 0.04s 16580KB
stdin
Standard input is empty
stdout
I have 12 cars, BEEP of which are BEEP years old