Welcome to your Swift Program
1.
How do you create a new instance of a class in Swift?
How do you create a new instance of a class in Swift?
2.
How do you create a tuple in Swift?
How do you create a tuple in Swift?
3.
How do you declare a constant in Swift?
How do you declare a constant in Swift?
4.
What is the type of a variable that can hold either an integer or nil?
What is the type of a variable that can hold either an integer or nil?
5.
How do you iterate over items in an array in Swift?
How do you iterate over items in an array in Swift?
6.
How do you declare a string in Swift?
How do you declare a string in Swift?
7.
What does the @objc attribute in Swift indicate?
What does the @objc attribute in Swift indicate?
8.
What is the file extension for Swift files?
What is the file extension for Swift files?
9.
How do you safely unwrap an optional in Swift?
How do you safely unwrap an optional in Swift?
10.
How do you define an immutable variable in Swift?
How do you define an immutable variable in Swift?
11.
How do you write a single-line comment in Swift?
How do you write a single-line comment in Swift?
12.
How do you concatenate two strings in Swift?
How do you concatenate two strings in Swift?
13.
What is the type of a Boolean variable in Swift?
What is the type of a Boolean variable in Swift?
14.
How do you create a range in Swift?
How do you create a range in Swift?
15.
How do you handle multiple errors in a single do-catch block in Swift?
How do you handle multiple errors in a single do-catch block in Swift?
16.
What is the shorthand for nil-coalescing operator in Swift?
What is the shorthand for nil-coalescing operator in Swift?
17.
How do you define a computed property in Swift?
How do you define a computed property in Swift?
18.
How do you declare a type alias in Swift?
How do you declare a type alias in Swift?
19.
How do you remove an item from an array in Swift?
How do you remove an item from an array in Swift?
20.
What is the default access level for a class in Swift?
What is the default access level for a class in Swift?
21.
How do you convert a string to an integer in Swift?
How do you convert a string to an integer in Swift?
22.
How do you define a struct in Swift?
How do you define a struct in Swift?
23.
How do you force unwrap an optional in Swift?
How do you force unwrap an optional in Swift?
24.
What is the keyword for defining a protocol in Swift?
What is the keyword for defining a protocol in Swift?
25.
Which keyword is used to define a function in Swift?
Which keyword is used to define a function in Swift?
26.
Which collection type in Swift can store duplicates?
Which collection type in Swift can store duplicates?
27.
How do you create an empty array in Swift?
How do you create an empty array in Swift?
28.
How do you handle errors in Swift?
How do you handle errors in Swift?
29.
How do you create a dictionary in Swift?
How do you create a dictionary in Swift?
30.
Which method is used to append an element to an array in Swift?
Which method is used to append an element to an array in Swift?