in javascript can following create 2 dimensional array , assign value in first position of first array.
var some_array = [[]] x[0] = ["a", "b", "c"] i have seen can't done in vb.net natively (or perhaps couldn't find how to).
dim some_array string(,) some_array(0) = {"a", "b", "c"} then got error tells i'm not specifying 2 dimensions of array.
is there way achieve in vb net?
javascript not have multidimensional array. instead, has array of arrays, aka jagged array. in vb.net, 2d array of strings defined this: dim mystring(,) string, while jagged array of strings defined this: dim mystring()() string. using jagged array, first "row" array each of cells contains array, it's possible initialize 1 "column".
one more thing difference between multidimensional , jagged arrays, jagged array can have different lengths of "columns", since each column 1d array. not case multidimentional array, has have same lenght columns.
proves point javascript, since following code line valid:
var =[[1,2],[4,5,6],[1]];
Comments
Post a Comment