Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Are Javascript arrays primitives? Strings? Objects?

Current License: CC BY-SA 2.5

14 events
when toggle format what by license comment
Feb 19, 2011 at 3:30 comment added ClosureCowboy @Matti Stack Overflow is pretty terrifying sometimes.
Feb 19, 2011 at 2:55 comment added Jared Farrish @Šime Vidas - That's a good deal of video. I'll definitely give them a viewing, if you think I should.
Feb 19, 2011 at 2:51 comment added Šime Vidas @Jared Watch this: video.yahoo.com/video/play?vid=111593 and this: video.yahoo.com/video/play?vid=111594 and this: video.yahoo.com/video/play?vid=111595 and this: video.yahoo.com/video/play?vid=111596
Feb 19, 2011 at 2:42 comment added Jared Farrish @Matti - And, I would like to say, I don't think this would have been too lengthy (as I imagine an answer being), although without an expert hand, it could have got messy. If I knew more, or was more confident, I would answer my own question. As you can see, I don't ask too many, for good or ill.
Feb 19, 2011 at 2:37 comment added Jared Farrish @Matti - I think you have missed an opportunity to speak to a large group of learners. Sure, as I specified above, the standard explains much, but I'm looking for a meaningful narrative, not a dry script with facts. How does the standard actually apply in reality? From a knowledgeable, learned person?
Feb 19, 2011 at 2:33 comment added Matti Virkkunen @Jared: No. I'll rather go to sleep. One thing though; you should make a clear distinction between a variable and a value. They're two different things. If you want all the nitty-gritty details about how objects work, go read the ECMAScript standard (I think I saw a link to it in a comment above)
Feb 19, 2011 at 2:31 comment added Jared Farrish @Matti - Begin from the beginning. What is a variable in Javascript? A primitive, the only primitives that "make sense" are String, Boolean and Number. So how does Javascript keep objects, arrays? Why/how do they differ? What does each mean, when should I use each? Coming from PHP, we make no differentiation between indexed and associative arrays, they are the "same". Is this meaningful? Just step through it, explaining each step.
Feb 19, 2011 at 2:27 comment added Matti Virkkunen @Jared: I'm sorry, but I do not understand what you want me to help you understand.
Feb 19, 2011 at 2:26 comment added Jared Farrish @Matti - "any programmer" Explore this. So many start with Javascript. I think this is important, because it could expose something that's underlying within Javascript, and a BIGGER MEANING. Help me understand why.
Feb 19, 2011 at 2:23 comment added Matti Virkkunen @Jared: When you say "array", any programmer will assume you need an ordered list. If you don't need one, saying "array" is only going to confuse anybody reading your code. From a technical point of view it shouldn't make much of a difference, the overhead, if any, should be insignificant. Also, one thing: Do you use PHP a lot?
Feb 19, 2011 at 2:22 comment added Jared Farrish @Matti - Yes, but I'm looking for context. Help me understand why. Is it overhead? Is it practice? Is it good common sense? What makes it worthwhile to ditch arrays and go with objects? Does it matter? Assume I don't understand the difference. I believe you have the knowledge, but help me understand why it's significant.
Feb 19, 2011 at 2:18 comment added Matti Virkkunen @Jared: Because there is no need to create an array if you're not going to use the functionality offered by it. It's only confusing.
Feb 19, 2011 at 2:16 comment added Jared Farrish That last "If you don't need an ordered list of values, use a plain object." is interesting, Matti. Why?
Feb 19, 2011 at 2:14 history answered Matti Virkkunen CC BY-SA 2.5

AltStyle によって変換されたページ (->オリジナル) /