Answer the question
In order to leave comments, you need to log in
How to understand such a record in js?
var arr= [];
var obj= {};
arr.length = obj; // <==== что это значит? и как это работает?
Answer the question
In order to leave comments, you need to log in
Such an entry is called bydlokod.
Specifically, if you write an object to the length property of an array, then there will be an error:
RangeError: Invalid array length
But probably by the time this line is executed, obj is no longer an object, the dynamic nature of js plus kilometer functions that are usually written by coders allow this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question