Constants and variables
Now, we are ready to dive into the basics of the Objective-C language. Objective-C has constants and variables very similar to Swift, but they are declared and worked on slightly differently. Let's look at how to declare a variable in both Swift and Objective-C:
var number: Int int number;
The first line should look familiar to you, as it is of Swift. The Objective-C version doesn't actually look all that different. The important difference is that the type of the variable is declared before the name instead of after it. It is also important to note that Objective-C has no concept of type inference. Every time a variable is declared, it must be given a specific type. You will also see that there is a semicolon after the name. That is because every line of code in Objective-C must end with a semicolon. Lastly, you should note that we have not explicitly declared number
as a variable. This is because all information is assumed to be a variable in Objective-C unless specified...