How to return an array combined with a string

I’m doing the Cash Register project.
I’m almost finished but I have trouble returning the result. The cid array is not being returned as an array when combined with a string, which is required for one of the conditions. Here’s an example Edit fiddle - JSFiddle - Code Playground

you need to return an object, not a string

I went about it a different way and my solution doesn’t involve objects. I’ve worked on this for days and this is the last step. Is there no way to return the array with a string?

Nope. A string is not an array. You must return an array.

Oh wait, i think i know what you mean. I created a closed object and returned that and it works

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