We're a place where coders share, stay up-to-date and grow their careers.
() => `#${Math.floor(Math.random()*(16777215 + 1)).toString(16).padStart(6,"0")}`
Discussion on: Generate and Set Pseudorandom Hexadecimal Background Color Using JavaScript
Replies for: This is awesome! Now I get to spend this afternoon understanding the code. Thank you.