Consider the following scenario:
var defaultArr = ['a', 'b', 'c', 'd'];
var availArr = [];
var selectedArr = [];
If I pass an array of some value indexto param, I need to split my array
Example:
If the index of the array: 0,2
Expected Result:
availArr = ['b', 'd'];
selectedArr = ['a', 'c'];
Is there a default way to do this?
source
share