Finalized js template structure for foreach loop so that it matches with best practices of Sencha Javascript.