JSFiddle - React, Tailwind, and code Playground

by Mike Gleeson

HTML

<section class="header">
  
</section>

<section class="body">
  
</section>

<section class="footer">
  
</section>

JavaScript

function buildDDL(arr, id, optionId, display) {
	let html = "<select id='"+id+"''>";
  for(var item of arr) {
  	html += "<option id="+item[optionId]+"'"+item[display]+"</option>";
  }
  
  html +="</select>";
  return html;
}