The Language
Part of the Fundamentals section of Coddy's Swift journey — lesson 1 of 86.
Swift is a powerful and intuitive programming language developed by Apple for building apps on iOS, macOS, watchOS, and tvOS.
Challenge
BeginnerWelcome to your first Swift program! The code is already written for you.
What to do:
- Look at the code:
print("Hello Swift!") - Press the "Run Code" button to execute it
- You should see "Hello Swift!" appear in the output
Cheat sheet
Swift is a programming language developed by Apple for building apps on iOS, macOS, watchOS, and tvOS.
To print output to the console, use the print() function:
print("Hello Swift!")Try it yourself
print("Hello Swift!")All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsModulo OperatorCompound AssignmentRecap - Simple MathComparison Operators7Basic IO
Print FunctionString InterpolationReadLine InputType ConversionRecap - Till 120Recap - True or False10Functions
Declare A FunctionParameters And ArgumentsReturn ValuesArgument LabelsRecap - Sigma FunctionRecap - Validation FunctionDefault Values13Iterating Over Sequences
Iterating Over ElementsThe Enumerated MethodIterating Over Strings P1Iterating Over Strings P22Variables
Let vs VarType AnnotationsNumbersStringBooleanNaming ConventionsRecap - Initialize Variables5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Ternary Operator8Bill Split Calculator
Welcome MessageGetting Input3Optionals
What Are OptionalsUnwrapping With If LetGuard LetNil Coalescing OperatorRecap - Safe Unwrapping9Loops
For-In LoopWhile LoopRepeat-While LoopBreakContinueRecap - FactorialRanges In LoopsNested LoopRecap - Dynamic Input