Skip to content

Commit

Permalink
update final boss
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlhlee authored Feb 12, 2019
1 parent 43d80e7 commit 7884c33
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions solutions.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,20 +505,19 @@ Final Boss
*/

var phrase = "An apple a day keeps Alice feeling awesome!";

function removeLetter(str){
var newArr = [];
for(var i = 0; i<str.length; i++){
console.log(str[i]);
if(str[i] !== 'a' && str[i] !== "A"){
newArr.push(str[i]);
}
var newArr = [];

function removeLetter(str){
var strToArr = str.split('')
for(var i = 0; i<strToArr.length; i++){
if(strToArr[i] !== 'A' && strToArr[i] !== 'a'){
newArr.push(strToArr[i])
}
console.log(newArr);
return newArr;
}
removeLetter(phrase);

}
return newArr;
}
removeLetter(phrase)
console.log(newArr)



Expand Down

0 comments on commit 7884c33

Please sign in to comment.