Stephen DeStefano Swift 5 Course - Part 3 (Lectures 8 to 11)

Well it's been a good few days but I'm back! No need for more of a preamble than that - straight into functions! Start Time - 14:06 Functions These are SELF-CONTAINED. It is best to name what the function actually does. Syntax - the name, parameters, return bit etc. Nothing else new here. Bit about the return value and print statement used. Underscore - placeholder for a constant/var without an actual name. 9 out of 10! Only one that was wrong was a bit of a trick question. OK next! Returning Multiple Values So this of course means returning a tuple All very technical - again, Stephen combines lots of elements - for loops, if statements, optionals...all hard to keep on top off! Names of return types - optional. Used to improve readability of code. Argument Labels and Parameter Names Argument label - used when calling the functions. Better for readability. Swift used the parameter name as the default. Labels are used on the outside - on the left of th...