This is more of a general JavaScript question as Mark points out arrays and dynamic you just push another array inside your array.
So... var a = [1,2,3]; var b = []; b.push(a); b[0][1] === 2 On 13 Jun 2012, at 00:23, Mark Hahn <[email protected]> wrote: > The question assumes arrays are pre-allocated. They aren't. They are only > added dynamically. > > So every array starts as one-dimension and then later can be looked at as > two-dimensional if more arrays are added inside. Even then the analogy to > two-dimensional arrays can break down if you add something like an integer > aside the other internal arrays. > > On Tue, Jun 12, 2012 at 3:28 PM, Ben Noordhuis <[email protected]> wrote: > On Wed, Jun 13, 2012 at 12:21 AM, vitoa <[email protected]> wrote: > > Hi, I want to create a empty bidimensinal array (table) in node js but > > i'm not going in good way > > > > For one dimension array its simple like var array=[] > > But for two dimensional array I can not use var table = [][] > > > > How can I do this? > > This question would have been more appropriate for > comp.lang.javascript. The syntax you're looking for is `var a = [[]]`. > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
