Skip to content

Instantly share code, notes, and snippets.

View quinton-c's full-sized avatar

quinton-c

  • OKC
View GitHub Profile
//set input equal to the phrase you wish to translate into whale
let input = 'turpentine and turtles';
const vowels = ['A', 'E', 'I', 'O', 'U'];
let resultArray = []
for (let i = 0; i < input.length; i++) {
for (let v = 0; v < vowels.length; v++) {
if (input[i].toUpperCase() === vowels[v]) {
if (input[i].toUpperCase() === 'U' || input[i] === 'E') {
resultArray.push(vowels[v], vowels[v]);