help with exercise 2 in JS Assignment 10: Array Properties and Methods
HannahB593 (2)

I'm really stuck on this question- the rest i understand and have correctly. Just not sure what's wrong with two.

This is what I have:

function exerciseTwo(snacks){
let favoriteSnack= 'grapes';
snacks.push = (favoriteSnack (or grapes?) ;
return snacks;

before i added "let favoriteSnack" i had gotten the error saying "grapes is undefined."- so that's why i tried to use that. been looking for clues but unsure- can anyone help ?

You are viewing a single comment. View All
Giothecoder (130)

@mwilki7 I’m pretty sure they want something like the second though.

because look he says 'grapes' and never makes the var?