React Js Loop Through String Javascript Definition