How to push array in another array using JavaScript?
Example:-
var a = [1,2,3,4,5]
var b = [6,7,8,9,10]
i want to push a & b into c
var c =[[1,2,3,4,5],[6,7,8,9,10]]
var a = [1,2,3,4,5];
var b = [6,7,8,9,10];
var c =[];
c.push(a);
c.push(b);
yourObject['keyOfYourChoice']=c; and access it with yourObject['keyOfYourChoice'] or yourObject.keyOfYourChoiceJSON.stringify(c) in supporting browsers
cto equal[[1,2,3,4,5],[,6,7,8,9,10]]or[1,2,3,4,5,6,7,8,9,10]?.push()