<input type="color" id="color" placeholder="Enter color">
<div class="select">
const color = document.getElementById("color").value;
In short I wanna build a program that lets user input the color, and that the value of the color needs to be sent to another program without the hashtag.
I was wandering is there a way that I remove Hashtag from Const color.
Would be great if I can keep the same const name.
2
Answers
a constant cannot be assigned a new value
You cant change const color, but you can just send:
Output would be like ‘FFFFFF’ if previously it was ‘#FFFFFF’
or you can use replace to value: