Chapter 1 - Introduction - Creating the Animal Model

When it is explained how to create the struct that models the Animal JSON, some properties are defined as var and other as let. Why are defined in such way. In relation to optionals, I suppose that properties marked as optional is because the service may not return value in them, isn’t it?

Thanks in advance and greetings,


Hi @faabalia yes, the optional were to account for times when the service doesn’t return a value. Let me get back to you tomorrow with the answer to your other question.