+ 2
Why the background color is not changing ??
8 Antworten
+ 4
You can use either concatenation or template literals to solve your problem.
concatenation - "rgb("+x+","+y+","+z+")"
template literals - `rgb(${x},${y},${y})`
+ 5
You have created the main var outside the function. Try making that inside the function. And use the var keyword and not let keyword.
+ 3
https://code.sololearn.com/WtBk44iSlXad/?ref=app
ln e this may help you
+ 2
ln e it won't work because you are giving the background colour as a string
+ 2
And not the actual numbers
+ 2
Thanks a lot for your answers.
+ 1
It's still not working.
+ 1
So how to fix it if I need a bg color varying randomly with each click ??