I am following this tutorial and I cannot understand the following screenshot function code.
What I don’t understand is that inventory is the object in the data
but how the author is using it as an array totally confuses me. How does an array add something to a object?
I am new to Javascript