I have an array with some text. One variable is set to first element in the array, how can I set that function can change that variable change value to value from next element in an array?
var q= [{qs: 'JR?', id: 1},
{qs: 'DR?', idp: 2},
{qs: 'MR ?', idp: 3},
{qs: 'SR ?', idp: 4},
{qs: 'LR ?', idp: 5} ];
$scope.qes= q[0].qs;
$scope.check= function(){
$scope.qes = q[0].qs + 1; // something like that
}