How to extract the objects from an array to put them in variables that are created according to the index of the array that corresponds to the object
I tried it :
response.forEach((el, i, )=>{
let nameProduct[i] = ` the name of product : ${response[i].nameProduct}`;
console.log(nameProduct[i]);
});
but it's a fail