fork(1) download
  1. function temp(str) {
  2.  
  3. const vowelMap = {
  4. a: "tiva",
  5. e: "llia",
  6. i: "mus",
  7. o: "phylum",
  8. u: "rea"
  9. };
  10.  
  11.  
  12. return str.split('').map(c => vowelMap[c.toLowerCase()] === undefined ? c :c + vowelMap[c.toLowerCase()]).join('');
  13. }
  14.  
  15.  
  16. const x = temp("I love water!");
  17. console.log(x);
Success #stdin #stdout 0.03s 17476KB
stdin
Standard input is empty
stdout
Imus lophylumvellia wativatelliar!