Use Array.reduce() to fill
I have a list of colors sitting in my database and a <select> HTML element where I want to use these colors as <option>s. Colors I get the values from the database and store them in a variable. const colors = [ {val: “1“, name: “Black“}, {val: “2“, name: “Red“}, {val: “3“, name: “Yellow“}, {val:…