What is the output of this code? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
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