..

swift-moc

Variables

  • var for variables
  • let for constants. Constants are recommended

Data Types

  • Int
  • Double

Strings

  • Double quotes
  • Escape quotes with a backslash if they are to be a part of the string
  • Multiline strings with """

String interpolation

  • Use \() with the variable name in between the parentheses to substitute the value of the variable in to the string
  • My name is \(name) and I am \(age) years old