how change e.target.value Tell me please
const changeValue = (e) => {
if (checkedPickup && e.target.name === "address") {
e.target.value === "LosAngeles";
}
}
CodePudding user response:
You have a little problem that ===
operator that mean you ask is they are eqaul
But =
operator assign new value. And Don't forget add html to interact with
This is your code edited:
const changeValue = (e) => {
if (checkedPickup && e.target.name === "address") {
e.target.value = "LosAngeles";
}
}
CodePudding user response:
Very good question, in the end i don't agree with the question