Angularjs Loop Through Array Javascript Mdn Setter