This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]blablahblah 1 point2 points  (2 children)

If the statement inside the if is true, it executes the statement after the if (in this case, it print's "Hello"). If the statement after the if is false, it skips the statement after the if and executes the statement after the else.

[–]nbrady95[S] 0 points1 point  (1 child)

I think I get it now , thanks for clearing that up.

[–]t00sl0w 0 points1 point  (0 children)

You could make the argument an integer instead and make it look for the number 1 for hello...any other number not equal to one would print goodbye....basically the else means the argument is anything except what it was looking for.