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,
xis 5 and45is written, then you dox=4 + ++xwhich evaluates tox=4 + 6which is10, so it writes 10, leaving you with 4510.