Did I use this JS variable correctly in the html document?
<head> <script> var bgcolor = #ff0000 </script> </head> <body style="background-color: var(--bgcolor);"> </body> I want to make a JS function which would change the background color on certain input. I'm playing around with JS functions, and I can't get the "var"…