What is the output of this code? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

What is the output of this code?

$n=5; if($n<6){$n++}; echo $n;

13th May 2020, 5:00 PM
🎯M43L⏩
🎯M43L⏩ - avatar
2 Respuestas
0
I'm assuming 6? If n(5) is smaller than 6, increase n by one
13th May 2020, 5:03 PM
HNNX 🐿
HNNX 🐿 - avatar
0
Error- you seem to have misplaced the semicolon in the if statement. if($n<6){$n++;} You can run it on the code playground to check the output.
13th May 2020, 5:04 PM
Avinesh
Avinesh - avatar