Return

The return keyword is used to exit from a function or to return a value from a function (and exit it).

function isAdult (age : Int) : Bool
{
if(age < 18)
{
return false;
}
return true;
}

This is a function that should help you understand how to use the return keyword. It returns false if the age is inferior to 18, or else it returns true.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.34.39