July 11, 2020

100 Days of SwiftUI – Day 6 – Closures

Probably one of my least favorite things.

It seems a bit ridiculous because I guess we’re just not using practical examples. I don’t see where I would ever want to use these.

I’m just clicking through the quizzes and that it terrible but that is how enthusiastic I feel about closures.

This is a lesson that I couldn’t wait to get through.

Tomorrow is Structs and I actually like those.

100 Days of SwiftUI – Day 5 – Functions

Variadic is a new term for me. The ability to pass many things into your function by using…

func square(numbers: Int…) {
for number in numbers {
print(“\(number) squared is \(number * number)”)
{
{

square(numbers: 1,2,3,4,5)

1 squared is 1
2 squared is 4
3 squared is 9
4 squared is 16
5 squared is 25

This is something I haven’t used before but I might in the future.