@ByZource : Because by the time loop ends, you're last color is applied to body
loop runs too fast for you to visually notice the changing colors
what are you trying to achieve here, if I may ask?
I have this website http://ifrnd.org/main/ and I want to make the grey background to occupy full width of the page in the "Welcome" section. It's placed inside a container. So I have to use position = absolute. But that breaks things up and it doesn't stays responsive. Any help will be highly appreciated.
@adityaparab I work on the first project (quotes generator) and I want to change the background color witch each click (like the one giving as the example) the quotes generation is already done but I stuck with the color switching...
@ByZource I see, you can do it like you select a random number between 0 and colors.length