👤

var words = ["apple", "bug","car", "dream", "ear", "food"]
var filteredWords = [];
for(var i = 0; i < words.length; i++){
var word = words[i];
if (word. Length < 4){
appendItem(filteredWords, word)
}
}
console.log(filteredWords);
If the program above is run, what will be displayed in the console?
O A. [apple, dream]
B. [bug, car, ear]
O C. [bug, car, ear, food]
O D. [apple, dream, food]

Var Words Apple Bugcar Dream Ear Food Var FilteredWords Forvar I 0 I Lt Wordslength I Var Word Wordsi If Word Length Lt 4 AppendItemfilteredWords Word Consolelo class=

Answer :

Answer:

B

Explanation:

I haven't taken cs principles, but i have taken cs a

is that python?

bug, car, ear are the only words less than 4 characters in legnth