0 votes
in JavaScript by

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

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
...