Can someone assist me with the following task:
1. Generate an array containing 10 numbers ranging from 0 to 360. 2. Display these numbers on the DOM within a chosen element. 3. Adjust the background color of each number based on its HUE value in (hue, saturation, lightness).
//1
let numbers = [1,26,320,45,56,216,78,88,119,100]
console.log(numbers)
//2
let numElement = document.querySelector('.nummer')
//3
function adjustColor(){
const mappedNumbers = numbers.map(x => {
const outputElement = document.getElementById('output2')
numbers.forEach(num => {
if (num === 119) outputElement.style.background = `hsl(${num}, 100%, 50%)`
})
outputElement.innerText = numbers
});
}
adjustColor()