← home

LPTHW 18, 19, 20, 21… beer battered and fried

Exercise 18: Names, Variables, Code, Functions Exercise 18 offers a formal introduction to functions. The author explains that functions basically: 1) Name pieces of code (the way variables name strings & numbers) 2) Take arguments (the way scripts take argv) 3) Let you make your own “mini-scripts” or “tiny commands” using 1 & 2 He explains how to create a function and then we walk through four functions that work like our previous scripts. I typed and ran the functions without issue. I really enjoyed ...