I am running a forEach()
loop, and I need to console.log()
. But I want to get a different color for each iteration. I went trhough docs, but couldn't find anything. Is there any way possible to achieve the same?
let arr = ["a", "ab, "abc"]
arr.forEach(arr, e => {
console.log(chalk.red(e)) //maybe something like - chalk.randColor()
})