Smart pantry restocker broken a little

I made the smart pantry restocker and altough it delivered what it told me to, it just wouldnt let me finish it. I know the js is harsh but damn. Make the instruction more clear or make the code that checks what i write less harsh. Love the rest of the site and the course:)

if you could add more details, we can help you better, and maybe fix the project is needed. Without your code and more details there is nothing we can do