document.getElementsByTagName('span')[0].onclick = function(ev) {
this.innerHTML, this.parentNode.id = "Z";
//^^^^^^^^^^^^^^^^^^^^^
//this.innerHTML = "Z";
//this.parentNode.id = "Z";
}
#Z {
color: red;
}
<div>
<span>x</span>
</div>
i want to apply the value "Z" in to this.innerHTML, this.parentNode.id in a single line instead of two lines but it doesn't work using comma