How ++ works in Javascript? Find output of below Javascript code.
var a = 1;
document.write(a--);
document.write(a);
a) 00
b) 01
c) 11
d) 10
Answer:- D
reason:- document.write(a--); will print 1 and after than it will decrement the variable a value to 0 , next line document.write(a); will print 0.