My issue is that logging exactly the same variable value, but accessing it in a different way, yields two different results.
console.log(car[1].wheels.radius)
logs the integer 20 to the console, since 20 is the value assigned to car[1].wheels.radius.
Now, if I log the whole object:
console.log(car[1])
and access the element radius manually in the console, I can see that its value is 'NaN'.
Same happens when I use car[1].wheels.radius in a calculation, for instance 3.14*car[1].wheels.radius returns NaN, even though this is a multiplication of 3.14, a number, and car[1].wheels.radius, also a number, so it should return a number.
Anyone knows what the issue might be?