diff --git a/02week/pigLatin.js b/02week/pigLatin.js index 046434c94..16b6c074c 100644 --- a/02week/pigLatin.js +++ b/02week/pigLatin.js @@ -1,4 +1,4 @@ -'use strict'; +// 'use strict'; const assert = require('assert'); const readline = require('readline'); @@ -7,20 +7,53 @@ const rl = readline.createInterface({ output: process.stdout }); +// let arrayLength = (wordArray.length - 1) +// let firstToBack = wordArray.splice(arrayLength,0,wordArray[0]) +// function pigLatin(word) { +// let str = word.trim().toLowerCase(); +// result = str.split(''); +// const vowel = ['a', 'e', 'i', 'o', 'u']; +// if (vowel.includes(str.charAt(0))) { +// return result += 'way'; +// } else { +// for (let i=0; i { console.log( pigLatin(answer) ); getPrompt(); }); -} +}; // Tests