1. Incorrect statements regarding closures in Apple Swift? 1. In Apple Swift, a closure can capture all the references to variables from the surrounding context in which it is defined, but cannot capture references to constants.
2. Parameters used in a closure expression? 1. Constant parameters 2. Variable parameters 3. Inout parameters 4. Variadic parameters 5. Tuple parameters
3. Which of the following options holds true for observers in Apple Swift, when a property is set in an initializer before delegation takes place?
4. Correct about initializers? 1. Failable and non-failable initializers can be defined with the same name and parameter types 2. No value can be returned by initializers. 3. A failable initializer cannot delegate to a non-failable initializer.
5. What will be the output of the given Apple Swift code? let a;zUlnt8 = 0b11101111 let sz;lnt8 = 0b00110011 let c=a&b print(c)
6. In Apple Swift, which of the following statements is incorrect regarding a Switch statement?
7. In Apple Swift, which of the following statements is incorrect regarding inheritance?
8. In Apple Swift, which of the following is the correct 'identical to' operator?
9. Output Apple Swift code? func abc(param1: String) -> lnt[ print(param1) return param1.characters.count } func xyz(param1: String) [ abc(paramI) } xyz.('John Smith')
10. Output of code? func abc(p: Double...) -> Double { var sm: Double = O for number in p[ sm += number I return sm I Double{p.count) I print(abc(6, 7.25, 16.75))
11. How many times will the following Apple Swift code print the word 'green'?
12. In Apple Swift, structures are reference types, whereas classes are value types.
13. Output of code? class 81 ( func cn10 l for var a = 9; a >= 1; --a[ for var b = 9; b >= 0; --b[ if b%2==a/2 [ print((b%4).terminator: "") I I print("") III let s = a10 s.cn10
14. In Apple Swift, which type of parameters cannot be used by subscripts?
15. Valid statement regarding an assignment operator in Apple Swift? 1. let b=10 2. let (a,b) = (2, 3) 3. if a = b { )
16. Analyze the Apple Swift code given in Image 1, and choose its correct output from Image
17. Output of the last line? let a=4 print(a&+0) print(a&-O) print(a&0) print(a<<1) print(a>>1) print(a<<2)
18. Correct output? struct a1 [ var x = 0.0, y = 0.0 } struct b1 { var w = 0.0. h = 0.0 }
19. Options the code that will generate compilation error when executed. func abc(inout a: T, inout _ b: T) { let a1 = a a = b b = a1 print('\(a) \(b)') }
20. In Apple Swift, if we don't want to provide an external name for the second parameter of a method, then which of the following symbols can be used to override the default behavior?
21. Output ? enum Abc [ case Mark case John case Andrew case Lucy
22. ln Apple Swift, which of the following references should be used when it is known that the reference will never be nil during its lifetime?
23. In Apple Swift, which of the following symbols is used to write an implicitly unwrapped optional?
24. In Apple Swift, a class:
25. What will be the output of the given Apple Swift code? var nm = 5.0 class abc[ var x = 0.0 var y: String [ return '\(nm)' ]
26. Output? class a1 { func cn10 { for var a = 9; a >=1; --a { for var b = 9; b >= 0; --b{ if b%2==a/2 [ print((b%4),terminator: "“) } } print("") }}} lets = a1() s.cn1()
27. In Swift, which of the following collection types is/are implemented as (a) generic collection(s)? 0 Array
28. find out the output generated by the following lines. let b1 = abc([9,-7,3,110,4,721) print('number: \(b1.x), \(b1.y)')
29. In Apple Swift, subscripts can take:
30. Which of the following access levels is NOT provided by Apple Swift?
31. In Apple Swift, if an optional variable is defined without providing an initial value, then that particular variable is automatically set to which of the following?
32. In Apple Swift, which of the following statements are correct about extensions?
33. Which of the following statements are incorrect regarding a deinitializer in Apple Swift?
34. In Apple Swift, which of the following statements are incorrect regarding structures?
35. In Apple Swift, which of the following variables and constants are computed lazily?
36. ln Apple Swift. which of the following operators are right-associative?
37. Properties in the Apple Swift language?
38. In Apple Swift, which of the following statements are correct regarding protocols?
39. In Apple Swift, which of the following options hold true?
40. In Apple Swift, which of the following operators cannot be overloaded?
41. What is the name of the Xcode generated header file used to import Swift classes into an Objective-C Class given a product module named Example?
42. What does a retainCount represent in ARC?
43. Which one of the below functions definitions is wrong considering Swift language?
44. Which of these is a valid syntax for iterating through the keys and values of a dictionary? let dictionary = [keyOne : valueOne, keyTwo : valueTwo]
45. What is the name of the Swift language feature that Objective-C Blocks are translated into?
46. Which one creates a dictionary with a key type of Integer and value of String?
47. Which of these is an appropriate syntax for dispatching a heavy operation to a background thread?
48. What is the name of the deinitializer in a Class declaration?
49. Which of these is an appropriate syntax for declaring a function that takes an argument of a generic type?
50. Which of these is not a valid property declaration in Swift?
51. Which is the wrong definition of a protocol in Swift?
52. Which of the following structures has both computed and stored properties?
53. All Swift classes must inherit from which root class?
54. Which keyword is used on a function inside an Enumeration to indicate that the function will modify 'self'?
55. Which of these is a valid definition of a generic function that incorporates inout parameters in Swift?
56. Which of the following statements could be used to determine if a given variable is of String type?
57. Which of these could be an appropriate protocol declaration in Swift?
58. In context of a Swift subscript, which of the following is correct?
59. What is used to import Objective-C files into Swift?
60. What keyword is used to indicate a custom operator that will appear in between two targets, similar to the addition operator in this example? var sum = 10 + 10
61. Which is correct regarding Swift enumeration members when they are defined?
62. What type of object are Swift Structures?
63. let myChar: Character = 'b' Which code segment can be considered a complete Switch statement and will run without any error?
64. Can enumeration type have methods?
65. Which of the following declares a mutable array in Swift?
66. Which keyword is used in Swift when we want a property of a class to initialize when it is accessed for the first time?
67. Which is used for down casting?
68. Which of the following types can be used use as raw value types for an enumeration?
69. Which keyword do you use to declare enumeration?
70. When declaring an enumeration, multiple member values can appear on a single line, separated by which punctuation mark?
71. How do closures capture references to variables by default ?
72. What is used in Swift to represent any kind of object?
73. What is the name of the Objective-C Bridging Header given a product module named Example?
74. What is the type name that represents a character in Swift?
75. What is a muting instance method in Swift?
76. Swift Extensions are similar to categories in Objective-C except:
77. let array1 = ["A", "B", "C"] var array2 = array1 array2.append("D")
78. How could we create a subclass of the Structure, CGRect?
79. Which is correct regarding optional form of the type cast operator (as?)?
80. How could one declare a Swift Array type that can store any type of class object?
81. How could we cast the following array into an NSArray that accesses the NSArray method:
82. What set of keywords is most commonly used to iterate over a collections of items?
83. How can we use optional binding to determine if the variable string is not nil?
84. Choose the answer that declares an optional closure.
85. Let’s assume "numbers" is an array of unsorted integers. Which of these could be used to sort numbers?
86. How could you call the following function that takes a closure as an argument using trailing closure syntax: ()) { // function body goes here }>
87. How could the following closure be rewritten to use shorthand arguments? s2 } ) >
88. What is a trailing closure?
89. Which of the following statements is true regarding Swift closures and functions?
90. What are the available arithmetic overflow operators in Swift?
91. What specifies custom infix operator?
92. Which of following statements about functions is wrong?
93. In the below text, what type of return does the function ‘area’ give? Class Square: NamedShape { var sideLength: Double func area() -> Double { return sideLength*sideLength } }
94. In the below text, what is the class name? Class Square: NamedShape { var sideLength: Double func area() -> Double { return sideLength*sideLength } }
95. In the below text, what is the name of the class’s only method? Class Square: NamedShape { var sideLength: Double func area() -> Double { return sideLength*sideLength } }
96. What aspect of iOS development requires the use of NSOperation and/or Grand Central Dispatch (GCD)?
97. Which of following expressions can be used to rewrite the following UITableView instantiation in Swift UITableView *myTableView = [[UITableView alloc] initWithFrame: CGRectZero style: UITableViewStyleGrouped];
98. What will happen if you assign a value to a property within its own didSet observer?
99. Which of the following is correct to cube Integer?
100. In what queue should all UI code be handled?
101. In what order will the following statements appear in the console? println('1') dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY _DEFAULT, 0), {println('2')}); println('3')
102. When declaring a function, what symbol is used to indicate that an internal parameter name should also be used as an external parameter?
103. What is the result of the following code? func potteryBarn (name: String, score: Int) -> String { return 'Hello (name)! Your score is (score).' } potteryBarn ('Tom' , 2)
104. What is the return type in the following declaration: func potteryBarn (name: String, score: Int) -> String { return 'Hello (name)! Your score is (score).'}
105. What are the names of the input parameters in the following function: func potteryBarn (name: String, score: Int) -> String {return 'Hello (name)! Your score is (score).'}
106. Which is the correct optional form of a down cast operator?
107. To loop through a range of the numbers 1-9 without using 9, you would write…
108. Which of these is an invalid constant or variable declaration?
109. AnyObject can represent:
110. What is the name of the following function: func potteryBarn (name: String, score: Int) -> String { return 'Hello (name)! Your score is (score).'}
111. Which keyword do you use to define a function?
112. What is the type of Swift String, Dictionary, Array?
113. What will be the final value of 'a.data' and 'b.data' after following codes are executed?
114. How will ARC handle 'Country' instance and 'country2' reference when 'country1' is set to 'nil'?
115. What is true about Memory management in Swift?
116. To which of these types does ARC apply?
117. Why are IBOutlets declared with a weak attribute by default?
118. How could we declare a custom protocol that inherits from Equatable?
119. How can you use a nested type outside of its definition?
120. Which is correct for the following codes? class Country{ let name: String init(name: String){ self.name = name; } var city: City? }
121. Which keyword is used to declare an extension in Swift?
122. Which of the following statements is true when talking about classes and structures in Swift?
123. How could we extend String to conform to protocol MyProtocol? Answers:
124. Which keyword do you use to define a protocol?
125. Which of these statements declares cityArray as a mutable array?
126. Which of these collection types is not included by default in standard Swift?
127. What happens when Swifts String, Array, and Dictionary objects are assigned to a new constant or variable?
128. What is the most basic difference between Value and Reference types?
129. What is the type of Swift Enumerations?
130. Symbol used like a tuple to access arguments in Abbreviated Swift Closure syntax?
131. Swift Type is used to group multiple values into a single compound value? For example:let compoundValue = (3, 5)
132. Swift can compile alongside what other language?
133. Output of this segment of code: var x = 0 for index in 1...5 { ++x } print('(x)')
134. Can Structures be type cast in Swift?
135. To declare a constant in Swift you would use:
136. If we have a class named MyClass with a nested enum called Status, declared like so: class MyClass { enum Status { case On, Off } }
137. What is a mutating instance method in Swift?
138. Which keyword do you use to define a class?
139. Which is not a control transfer statement in Swift?
140. What is the correct way to compare the equality of two String type objects in Swift?
141. What is the super class name? class Square: NamedShape { var sideLength: Double func area() -> Double { return sideLength * sideLength } }
142. what is the property name? class Square: NamedShape { var sideLength: Double func area() -> Double { return sideLength * sideLength } }
143. To declare a function in Swift you would use what keyword?
144. With which keyword can you declare a constant in Swift?
145. Which of the following could be used to loop through the range of numbers 5-12 including 12?
146. Which of these operators is used to check whether or not two instances are identical?
147. If a class has a superclass and conforms to multiple protocols, what is the correct order to list their names in the initial definition of the Subclass?
148. Which one is correct function definition?
149. Which of the following statements about Extensions is false?
150. What is the output of this segment of code? var x = 0 for index in 1...5 { ++x } println('\(x)')
151. Which of the following could be used to indicate the Function Type of the following function: func joinStrings(stringOne: String, stringTwo: String) -> String { return stringOne + stringTwo }
152. What are the features of Swift Programming?
153. What will be the output of the following code snippet? var ary1 = [1, 2, 3, 4]; var ary2 = ary1; ary2.append(5); var result = ary1.count;
154. What is Managing Memory in Swift?
155. Shifting Behavior for Unsigned Integers?
156. Which of the following True statments of Closures?
157. Restrict extensions on a type in Swift?
158. Initialization is the process of preparing an instance of a _____?
159. Which of is not a valid Access control in Swift?
160. How to hide status bar in ios app with Swift?
161. What is the difference between let and var in swift? let x = 10 var x = 10
162. What is Swift ?
163. Tuples group multiple values into a single _____ value?
164. Swift Generics & Upcasting
165. List out what are the control transfer statements used in Swift?
166. Swift has built-in support for checking _____ which ensures that you don’t accidentally use APIs that are unavailable on a given deployment target?
167. Protocols can be accessed as types in?
168. How to get userinfo from NSNotification in swift 3?
169. How do you save local storage data in a swift application?
170. __ can require that conforming types have specific instance properties, instance methods, type methods, operators, and subscripts?
171. Use func to declare a function. Call a function by following its name with a list of arguments in parentheses. Use -> to separate the parameter names and types from the function’s return type?
172. The example below defines two variables, movieCount and songCount, which count the number of Movie and Song instances in the library array?
173. Which keyword is used to define a constant?
174. This represents a Boolean value which is either true or false?
175. Which of the following is not a valid data type in Swift?
176. An __ defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code?
177. Delegation is a design pattern that enables _____?
178. Define Initializer Role for Stored Properties?
179. In Swift, a function is defined by the '____'?
180. Storing Swift value types in Core Data?
181. How to enumerate an enum with String type, using the following code?
182. How to connect UI in Swift Language?
183. ARC tracks how many , , and variables?
184. ____ in Swift is implemented with the is and as operators. These two operators provide a simple and expressive way to check the type of a value or cast a value to a different type?
185. In Swift there are ____ kinds of types named and Compound?
186. Closure expressions in Swift language follow crisp, optimization, and lightweight syntax styles which includes?
187. A while loop performs a set of statements until a condition becomes false. These kinds of loops are best used when the number of iterations is not known before the first iteration begins. Swift provides two kinds of while loops?
188. Output of code snippet? let val1 = 'Hello,' let val2 = 'World' var result = val1 \ val2 print( result )
189. What can be execution problem? import UIKit func MinMax(array: [Int]) -> (min: Int, max: Int) { var min = array[0]; var max = array[0];
190. Which of the following is safest for downcasting?
191. How to compare below 2 strings? let str1 = 'string1' let str2 = 'string2'
192. The structure of a value or ____ value?
193. Output when following statement is executed? import UIKit let filename:String =
194. Output? import UIKit var array:[String] = ['string1', 'string2']; print('array list has (array.count) items.');
195. How to get local IP address in swift?
196. Following code which is super class? class X: Y { let str:String let val:Int? … init() { … } deinit(){ … } }
197. Choose the correct answer? import Foundation import AVFoundation func startCapture()
198. How to convert string into integer value? import UIKit let str_number = '320'
199. Output when the file doesn’t exist? import UIKit let filename:String = 'testfile'; var readdata:String = 'test data';
200. Extensions can add new instance ____?
201. Output? import UIKit var str1:String?='text1'; var str2:String='text2'; var int1:Int?=111; var int2:Int=222; var array:String[] = [str1, str2, int1, int2]; array=[];
202. Use the classes defined above to create a new Person instance, and try to access its numberOfRooms property as before?
203. Problem with code? import UIKit let fm = NSFileManager.defaultManager() fm.removeItemAtPath('file.old')
204. Problem in following code? import UIKit ; var intVar:Int?=3; intVar = nil; var strVar:String; strVar = nil;
205. Compare the below code and what will result? import UIKit var rank:Dictionary = [1:'First', 2: 'Second', 3: 'Third']; rank.updateValue('Forth', forKey: 4);
206. On which tag background color for the page can be set?
207. In Swift, what's the correct way variables consist?
208. What is the need for having structures?
209. Select the most proper answer. import UIKit import AVFoundation … … … let r:AVAudioRecorder? do { r = try AVAudioRecorder(URL: soundFileURL, settings: rSettings) r.delegate = self r.meteringEnabled = true r.prepareToRecord() } catch let error as NSError { r = nil print(error.localizedDescription) }
210. When the following code is executed, what it will do? funcfunc() { let layer = UIApplication.sharedApplication().keyWindow!.layer let scale = UIScreen.mainScreen().scale UIGraphicsBeginImageContextWithOptions(layer.frame.size, false, scale); layer.renderInContext(UIGraphicsGetCurrentContext()!) let s = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() UIImageWriteToSavedPhotosAlbum(s, nil, nil, nil) }
211. In Swift, what are the benefits of classes?
212. Which statements are true about Tuple?
213. How to extract a string from URL data?
214. Correct answer for Enumerations?
215. What are the Numeric Integer Literals?
216. How do you remove items from arrays?
217. Correct way to declare Decomposed Tuple?
218. Which integer literals have a decimal value of 17?
219. What is the return value of the type check operator - is ?
220. In Swift, objects are usually references to instances for both _____ and classes?
221. Extend the capabilities of our theoretical class, MyClass to conform to protocol MyProtocol?
222. The following keyword in the context of a Switch statement is required to force the execution of a subsequent case?
223. Correct keyword for defining a constant in Swift?
224. Based on var index = UInt8.max, which of the following operation results to the value of zero for var index?
225. Output of code ? import UIKit import AVFoundation var p: AVAudioPlayer?
226. If a class is named 'MyClass' with a nested enum called 'Status', how do you indicate that a variable is an enum of type 'Status' outside the context of 'MyClass'? class MyClass { enum Status { case On, Off } }
227. Appropriate syntax for dispatching a heavy operation to a background thread?
228. How to hide status bar in iOS app with Swift as follows?
229. How can you fix the missing characters for the following code? func userScore -> Bool { return true }
230. Suppose below variable declaration, select a right answer? import UIKit var str = 'string' var ŝanĝiĝema = 'хувьсагч' var & = '&'
231. The following attribute can be used to allow a protocol to contain optional functions and to be used in ObjC?
232. What is the return type of the following code? func nameFunc() -> String { return 'Jhon' }
233. What is the correct way to import Objective-C files into Swift?
234. What does Swift compile to?
235. Please check following code and tell what can be problem? import UIKitvarintVar:Int?=3 intVar = nil varstrVar:StringstrVar = nil
236. Closures capture ____ reference of objects by default
237. Objective-C nullable properties will appear as __ properties when imported to Swift project.
238. Objective-C class can be instantiated in Swift class only through
239. After importing Objective-C code to Swift, the above method will be imported as (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style;
240. extension Int { subscript(var myInt: Int) -> Int { var no1 = 1 while myInt > 0 { no1 *= 10 --myInt } return (self / no1) % 10 } } print(12[0]) What is the output?
241. Which of the following are true about extension functionalities?
242. Instance methods can be _____ in extension
243. Extension can be used to create a new nested type of the following:
244. Which is true about the Dictionary?
245. If C is a superset of D, then D is a subset of C
246. Swift allows you to write semicolons at the end of statement.
247. In which data types can you define methods?
248. A Switch statement cannot handle String.
249. GCD conforms with the ____ order.
250. func addStudent(_ student: Student) { concurrentStudentQueue.async(flags: .barrier) { self._students.append(student) DispatchQueue.main.async { // self.postContentAddedNotification() } } } The code will ensure that the submitted DispatchWorkItem will be executed in parallel with any other DispatchWorkItem in the same queue.
251. GCD can dispatch a task
252. NSOperationQueue conforms to
253. GCD provides the following types of Queues:
254. 'NSOperationQueue.mainQueue().addOperationWithBlock' will add the operation to
255. unowned reference types are declared as __
256. Weak references are declared as _____ types
257. What is the typical byte width of Float data type in Swift?
258. Deallocation never happens due to ___
259. During which stage memory is taken from stack or heap?
260. Stage when memory returned to stack or heap?
261. Serialize and archive your custom types in Swift?
262. Can you pass Int to a String type variable?
263. In Swift, private properties of a class can be accessed in any of it's extension.
264. Create a new name for an existing type in Swift?
265. The 'let' keyword is considered as:
266. var myName: Int = 'John Doe' print(myName) The output will be
267. The following are collection types in Swift
268. enumerated() function iterates by __
269. What is the correct way to import an Objective-C class into bridging header file?
270. New initializers can be provided using extension
271. Overriding functionality is possible using extension
272. Objective-C class factory methods will change into _____ after importing to Swift
273. Bridging header file will not be compiled due to the following issues:
274. Which is the correct naming scheme for an Objective-C bridging header file into Swift project
275. var tools: Set = ['Screwdriver', 'Pliers', 'Screwdriver'] var tools: Set = ['Screwdriver', 'Pliers', 'Screwdriver'] Which is correct?
276. We can create an array of any type
277. var myVar = 100 myVar = 'Hello World' print(varA) The output will be
278. print(myStr) What will be the output of the above code snippet?
279. var varB = 3.14159ng is the c, varB is inferred to be of type _____
280. A closure is a function without a name.
281. Can cyclical relationships exist in value types?
282. A sequence of characters surrounded by double quotes is called _____?
283. The following are unordered collection types:
284. Typical range of type Int8 is __
285. What is this code an example of? let val = (Double)6
286. What is the error in this code? let x = 5; guard x == 5 { return }
287. What is the raw/underlying type of this enum? enum Direction {case north, south, east, west}
288. Why is dispatchGroup used in certain situations?
289. What is this code an example of? let val = 5; print("value is: \(val)")
290. What is the value of y? let x = ["1", "2"].dropFirst() let y = x[0]
291. What is the value of test in this code? var test = 1 == 1
292. What is the value of y? var x: Int? let y = x ?? 5
293. What is the type of this function? func add(a: Int, b: Int) -> Int { return a+b }
294. What is the correct way to call this function? func myFunc(_ a: Int, b: Int) -> Int {return a + b}
295. The Codable protocol is _?
296. What is the type of value1 in this code? let value1 = "\("test".count)"
297. When a function takes a closure as a parameter, when do you want to mark is as escaping?
298. What describes this line of code? let val = 5
299. DidSet and willSet are examples of _?
300. How many values does vals have after this code is executed? var vals = Set = ["4", "5", "6"] vals.insert("5")
301. How can you avoid a strong reference cycle in a closure?
302. What is wrong with this code? if let s = String.init("some string") { print(s)}
303. Which code snippet correctly creates a typealias closure?
304. How do you reference class members from within a class?
305. All value types in Swift are _ under the hood?
306. What is the correct way to add a value to this array? var strings = [1, 2, 3]
307. How many times will this loop be executed? for i in 0...100 {print(i)}
308. What can AnyObject represent?
309. What is the value of t after this code is executed? let names = ["Larry", "Sven", "Bear"] let t = names.enumerated().first().offset
310. What is the value of test after this code executes? let vt = (name: "ABC", val: 5) let test = vt.0
311. What is the base class in this code? class LSN : MMM {}
312. What must a convenience initializer call?
313. Which object allows you access to specify that a block of code runs in a background thread?
314. What is the inferred type of x? let x = ["a", "b", "c"]
315. How would you call a function that throws errors and also returns a value?
316. How do you designated a failable initializer?
317. In the function below, what are this and toThat examples of? func add(this x: Int, toThat y: Int)->{}
318. What is wrong with this code? for (key, value) in [1: "one", 2: "two"]{print(key, value)}
319. Which of these choices is associated with unit testing?
320. What data type is this an example of? let vals = ("val", 1)
321. What is wrong with this code? var x = 5; x = 10.0
322. What is wrong with this code? Let val = 5.0 + 10
323. What prints to the console when executing this code? let x = try? String.init("test") print(x)
324. How can you sort this array?
325. DispatchQueue.main.async takes a block that will be
326. When is deinit called?
327. How do you declare an optional String?
328. How many times this code will be executed? —OR— How many times will this loop be performed? for i in ["0", "1"]{print(i)}
329. What does this code print? let names = ["Bear", "Tony", "Svante"] print(names[1]+"Bear")
330. What is true of this code? let name: String?
331. What is the value of val after this code is executed? let i = 5; let val = i * 6.0
332. What is printed to the console when this code is executed? "t".forEach { (char) in; print(char) }
333. What enumeration feature allows them to store case-specific data? (Question does not make that much sense though. )
334. In the code below, AOM must be a(n)? class AmP : MMM, AOM { }
335. What is the value of numbers in the code below? let numbers = [1,2,3,4,5,6].filter{ $0 % 2 == 0}
336. What is the type of vals in this code? let vals = ["a", 1, "Hi"]
337. How can you extract val to x in tuple vt? let vt = (name: "ABC", val: 5)