I'm not quite sure how to ask this but, I have the following PHP function:
<?php
function checkAge($age) {
return ($age >= 21);
}
?>
Which can be used on this conditional:
<?php
if(checkAge(21)) {
echo 'welcome to the club';
}
else {
echo 'sorry! you are younger than 21';
}
?>
When defining the function, I'm only saying return ($age >= 21) and it seems to be returning 'true'. Does that mean that using return like that will return a boolean?
I'm sorry if I'm not being clear, this really confused me :(
Thank you in advance!