1
My teacher brought the question atoning, and he gives a lot of emphasis to the subject. After all, there are array[]
in fact on Javascript or are they mere disguised objects? As I am starting, I would like to know a concrete answer about.
One of the arguments used to validate the thesis for example is that you can use the array connotation to bring properties of an object. Example:
var person = { nome: 'Fulano de Tal', idade: 37, altura: 1.85 };
Above I created the object person
and their respective properties. Now suppose I want to take the property nome
of that object, I could do so:
person.nome; // "Fulano de Tal"
Or I can call with the array connotation:
person['nome']; // "Fulano de Tal"
Would that suffice to state that javascript arrays are nothing more than camouflaged objects? And how much relevance this can have on application development?