Open sweety546 opened 1 year ago
In lines 24 and 29, reversedFood should have been used instead of foods.
for (let i = 0; i < reversedFoods.length; i++) { if (reversedFoods[i] === 'egg' && eggsRemoved < 2) { eggsRemoved++; continue; }
result.push(reversedFoods[i]);
In lines 24 and 29, reversedFood should have been used instead of foods.
for (let i = 0; i < reversedFoods.length; i++) { if (reversedFoods[i] === 'egg' && eggsRemoved < 2) { eggsRemoved++; continue; }