How to iterate through an array and render html

I need help iterating through an array of objects and rendering out the html. I currently use jQuery in the following way, but I want to know of a more industry-standard way of accomplishing this. Also, if the answer is angular or react, I am amenable.

	arr_Pages.forEach(function( a) {
		var $nav= $( "<div/>", {
			id: 'nav-' + a.name,
			class: 'nav',
			html: a.nameNav,
         });
       $nav.appendTo($container);
});

Thanks in advance for your help!
Mike

Thank you for your reply! Your concise answer has encouraged me to learn

  • reduce() function
  • arrow functions =>
  • template literals ${}

which i imagine is the point of the website, right? :wink:

As a followup question, I have to build for IE11. What is your preferred polyfill solution? Babel?

Mike

Thanks for your prompt reply. You’ve been very helpful!