I want to creat array/s in javascripts.
But array/s numbers (how many to arrays to be created) is depend on dropdown div length.
I have calculated length of dropdown list using
$("#skill_type_name option").length)

But how to create arrays in javascripts in foor loop.
array names can be

or names will be given according to dropdown div values.
But how to creat arrays?

Member Avatar
var arr = ["a","b","c"];

Or you can create an object containing arrays...

var obj = {"arr1":["a","b","c"],"arr2":["x","y","z"]};

However there are no associative arrays in js, if you need 'string keys' then use objects.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.