0

Simple Javascript

Why is it that "i=i+1" and "i++" work, but when typing "i=i++" everything seem to be crashing instead of giving an error message ?

29th Jul 2019, 10:18 PM
MarkusS
MarkusS - avatar
2 odpowiedzi
0
i=i+1 means that i will be equal one number above after something happens in the loop or whatever, i++ means that i is incrementing so i cannot be equal i++...
29th Jul 2019, 10:19 PM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar
0
Dejan Francuz🥇 Aha thanks, but why doesn't "i=i++" just give an error instead of crashing ?
29th Jul 2019, 10:26 PM
MarkusS
MarkusS - avatar