KB Tag: Conditional Statements

  • Conditional Statements in Swift

    When you desire your code to perform only if a certain condition is true then you can use an if statement. You can execute a if like so: var brand = “Apple” if brand == “Apple” { print(“Brand is Apple”) } An  if statement is begin with if followed by the condition then a block, open and close braces. Let’s include a else after the if:…