KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The following two different code snippets seem equivalent to me: var myArray = Array(); myArray['A'] = "Athens"; myArray['B'] = "Berlin"; and var myObject = {'A': 'Athens', 'B':'Berlin'}; because they both behave the same, and also typeof(myArray) == typeof(myObjects) (both yield 'object'). Is there any difference between these variants?
Tags (comma-separated)
Save Edits
Cancel