1function vowelsAndConsonants(s) {
2//Create Array of vowels
3 const vowels = ["a","e","i","o","u"];
4//Convert String to Array
5 const arr = s.split("");
6//Empty vowels and cons array
7 var vowelsFound = [];
8 var cons = [];
9//Push vowels and cons to their arrays
10 for (var i in arr) {
11 if (vowels.includes(arr[i])) {
12 vowelsFound.push(arr[i]);
13 } else {
14 cons.push(arr[i]);
15 }
16 }
17//ConsoleLog so that they in order and cons follows vowels on new lines
18 console.log(vowelsFound.join('\n') + '\n' + cons.join('\n'))
19}
20//Test, Exclude in copy
21vowelsAndConsonants(javascriptloops);
22