Exploring a more efficient approach - I have these arrays at my disposal:
var model1 = ['10', '20', '30', '40','50','60'];
var model2 = ['80', '100', '200', '300','400','500'];
var model3 = ['1', '2', '3', '4','5','6'];
In my code where I utilize them, I currently do the following:
$scope.sli['model1'][0]=0;
$scope.sli['model1'][1]=10;
$scope.sli['model1'][2]=20;
$scope.sli['model1'][3]=30;
$scope.sli['model1'][4]=40;
$scope.sli['model1'][5]=50;
$scope.sli['model1'][6]=60;
I'm seeking a more streamlined method using a for loop. Ideally, I'd like to pass just the model array name and automatically split the array into indices. This way, any new models added in the future will be seamlessly incorporated without having to declare each one individually.