Obtain a value from a Vector 3

Hi,
I’m trying to extract a value from a Vector 3 to use it as a scalar.
I thought that it can be made like this:
const J1 = J[1]

I attach a playground that can be useful.

You can’t access a vector as an array, you must use the x, y and z properties instead: J.y instead of J[1].

1 Like