JavaScript Arrays (exercise 8)


Update - I added two additions instead of one which is why the exercise would not let me progress!

Hello all, I am very new to coding (please be gentle!) and am having a problem with the below exercise.

I followed the instructions (i think!) and the output is correct but the exercise is giving me an error message. I’m not sure if I have missed something?

let condiments = [‘Ketchup’, ‘Mustard’, ‘Soy Sauce’, ‘Sriracha’];
const utensils = [‘Fork’, ‘Knife’, ‘Chopsticks’, ‘Spork’];
condiments.push(‘Mayonnaise’, ‘Hummus’);

//output shows as one would expect:

‘Soy Sauce’

But I am receiving the below error message:

did you add an item to the condiments array?

The question asked for the addition to the array to be made by using .push() which is what I think I have done. Is anyone able to advise please? Thank you!


add your favorite condiment to the condiments array using .push().

‘Condiment’ in the singular. Add only one item.


Hi mtf

Many thanks for responding. I need to read the questions a few times before I start posting questions! Appreciate you taking a look.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.