it shows error when i run it like this.
but if i first use document.write(x=4,++x); //45
and then write again document.write(x=4 + ++x )
it surprisingly runs and shows me output //4510
can anyone tell me why
it shows error when i run it like this.
but if i first use document.write(x=4,++x); //45
and then write again document.write(x=4 + ++x )
it surprisingly runs and shows me output //4510
can anyone tell me why
Copyright © 2021 Jogjafile Inc.
After the first write,
x
is 5 and45
is written, then you dox=4 + ++x
which evaluates tox=4 + 6
which is10
, so it writes 10, leaving you with 4510.