0
JS/Javascript: Arrrggh! I am lost, again! Re: Associative Arrays and names vs numbers
Ok, if you will please refer to the JavaScript Tutorial under Associative Arrays you will see that it says that it can't use names/words...6 to 8 names of some programming languages (7, HTML, etc) as examples of Arrays and you can clearly see that these are not numbers, but words. So is there something I'm missing or didn't those specific words count?
2 odpowiedzi
+ 1
Hello, Michael!(Sorry it's taken so long to get your answer)
What SoloLearn is trying to say is that you can't use words for indexes in arrays because they won't be arrays anymore. So if you assign a value of an array like this: arr["name"] = "Mike"; It'll be equivalent to you defining an object:
var arr= {
name = "Mike"]}
So if you declare and assign a value the first way, you'll have to get the value like this: arr.name; This is because your array has become an object
0
So basically going TOO far in the assignation process? Like (sorta like) an instance of an instance of an instance's nephew's friend. Like that? Enough analogies. It is basically branching so far that you are left with a vapor of your intended. Hmm. I know what you mean, but I am having a really hard time finding a good analogy or definition. Actually, maybe I that would be a good definition. Having something so abstract that it is essentially too far (by now) to reach.