JavaScript: Dynamically creating an array.

  • Thread starter Thread starter ~J~
  • Start date Start date

~J~

~J~

Soldato
Joined
20 Oct 2003
Posts
7,558
Location
London
I'm trying to recreate something like the following:

Code:
   ['','Option', 'OPTION1',
        ['', 'OptionA, 'OPTIONA',
        ['', 'OptionB', 'OPTIONB'],
        ['', 'OptionC', 'OPTIONC'] 
   ], 
]

by concantanating some strings but this obviously isn't working.

Does anyone know of a way how I can convert a string into an actual array please?
 
Back
Top Bottom