Vowels and Consonants
From a short review;


arr1 and arr2 are terrible names, we could call them consonants and vowels
accessing sp[i] so often is not efficient, I would store that value in a variable
when dealing with lists, consider going functional (using forEach, map, reduce, join etc.)
sp is not a great name
There is a nicer way to iterate over the characters of a string with for( of )


Finally, I wanted to provide the below as an example where I incorporate the above points;

function vowelsAndConsonants2(s) {
  const vowels = [],
    consonants = [];

  for(const c of s){
    if('aeiou'.includes(c)){
      vowels.push(c);
    }else{
      consonants.push(c);
    }
  }
  console.log(vowels.join("\n"));
  console.log(consonants.join("\n"));
}