Error : The left-hand side of an assignment expression may not be an optional property access [duplicate]
I want to change the style of the tag when it is clicked, but I am facing this error
The left-hand side of an assignment expression may not be an optional property access
function removeItem() {
let item = document.getElementById("item");
item?.style.display= "flex";
}
Comments
Post a Comment