We are about to switch to a new forum software. Until then we have removed the registration on this forum.
As my knowledge of JS is extremely limited, I cannot properly describe the issue: it is more a curiosity than a real problem (it took me some time to pinpoint it).
Here I am creating 2 objects, setting the
type variable ONLY AFTER calling the object creation.
It looks like the object is not created immediately but only in a second time, after the variable has been set, even if the lines order would hint otherwise.
Is this JS or P5.js related? Is this due to hoisting?
I would like, for my own knowledge, to be directed to the proper docs in order to understand what is happening here. Thanks