Search code examples
javascriptarraysundefined

I fill "basket" array with objects. but then, when i try to get array lenght it return me "undefined" value


enter image description here

enter image description here

I fill "basket" array with objects, but then, when i try to get array lenght it return me "undefined" value.

enter image description here

The lengh is pale here, is problem connect with that?


Solution

  • The name of the property is length, not lenght.

    So,

    console.log(basket.length)