If Statements
Functions
SwiftUI
Tech News
iPhone Trivia
100

How many equals signs are used to check for equality in an if statement?

Two

100

What keyword is used to define a function in Swift?

func

100

What is the function to display text on the screen in SwiftUI?

Text

100

Which tech CEO recently bought Twitter?

Elon Musk

100

What was the most downloaded app in 2022?

TikTok

200

What is the punctuation for the "and" operator?

&&

200

What data type will the following function return?

func recommendFood(hungerLevel: Int) -> String

String

200

What component allows the user to type input in SwiftUI?

TextField (or TextEditor)

200

What company has created a VR space called the Metaverse?

Meta/Facebook

200

What was the most downloaded app of the 2010s?

Facebook

300

What is the punctuation for the "or" operator?

||

300

What is the term for "hungerLevel" in the following context?

func recommendFood(hungerLevel: Int) -> String

Parameter

300

What data type is used with Text in SwiftUI?

String

300

What is the name of the most advanced AI chatbot from the company OpenAI that is making headlines?

ChatGPT

300

What year was the iPhone first released?

2007

400

What is wrong with the following if statement?

if rating < 3 && > 1 { ... }

You need to repeat the variable name "rating."

if rating < 3 && rating > 1 { ... }

400

What is the term for the number 3 in the following context?

recommendFood(hungerLevel: 3)

Argument

400

What type of variable is connected to user interface components in SwiftUI?

@State variable

400

What does AR stand for?

Augmented Reality

400

What year was the SwiftUI framework first released?

2019

500

What is the punctuation for the "not" operator?

!

500

What is the term for the type of variable that RETURNS a value?

Computed property

500

What punctuation is used to bind a @State variable to a user interface component?

$

500

Which tech billionaire recently broke the world record for largest loss of personal fortune?

Elon Musk

500

What language was used to program iPhones and other Apple devices before Swift?

Objective-C