Im stucked in how to create this below;
1.Create an array with 10 numbers from 0 to 360 2. write out in DOM in an element of choice 3.Set the background color of each number, by using the number of HUE in (hue, saturation, lightness)
//1
let nummers = [1,26,320,45,56,216,78,88,119,100]
console.log(nummers)
//2
let parNummer = document.querySelector('.nummer')
//3
function brightness(){
const map1 = nummers.map(x => {
const skrivUt = document.getElementById('output2')
nummers.forEach(nummer => {
if (nummer === 119) skrivUt.style.background = `hsl(${nummer}, 100%, 50%)`
})
skrivUt.innerText = nummers
});
brightness()