learn javascriptwhale talk

Solutions on MaxInterview for learn javascriptwhale talk by the best coders in the world

showing results for - "learn javascriptwhale talk"
Bronagh
30 Mar 2017
1input = "You Are All Wee Gillis";
2vowels = ['a','e','i','o','u'];
3whaleTalk = [];
4input.split('').filter(v => vowels.includes(v.toLowerCase())).forEach(x => {
5  if (x === 'e' || x === 'u') {
6    whaleTalk.push((x + x));
7  } else {
8    whaleTalk.push(x);
9  }
10});
11console.log(whaleTalk.join('').toUpperCase())    //  OUUAEEAEEEEII
12