- 3

What is this Output?

Const population = 5; Console.log(population++);

18th Dec 2021, 3:01 AM
Pravin N
Pravin N - avatar
1 Resposta
+ 2
Well it is a error because increment operator change it's own value it's like var1 = var1 + 1 As reassigning is not allowed with const so it will give error
18th Dec 2021, 3:24 AM
Ayush Kumar
Ayush Kumar - avatar