What is the output of this code? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponses
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