|
compact
Overview of compact
compactGets a new array without the empty values. Usageobjx( array ).compact( [behaviour ]);
Examplevar a = [1,null,2,null,3,null]; // a.length == 6 a = objx(a).compact().obj(); // a.length == 3 // a == [1,2,3] | ||||
► Sign in to add a comment