NewJourney
Learn Swift
A free, interactive online Swift course. You write Swift on every lesson — syntax, optionals, structs, classes, protocols, closures — with AI hints when an optional surprises you, and a free certificate when you finish.
1,502+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
3 lessons216- 01The LanguageChallenge
- 02Hello World!ChallengeQuizAudio
- 03CommentsQuizAudio
Variables
7 lessons751- 01Let vs VarChallengeQuizAudio
- 02Type AnnotationsChallengeQuizAudio
- 03NumbersChallengeQuizAudio
- 04StringChallengeQuizAudio
- 05BooleanChallengeQuizAudio
- 06Naming ConventionsChallengeQuizAudio
- 07Recap - Initialize VariablesChallenge
Optionals
5 lessons532- 01What Are OptionalsChallengeQuizAudio
- 02Unwrapping With If LetChallengeQuizAudio
- 03Guard LetChallengeQuizAudio
- 04Nil Coalescing OperatorChallengeQuizAudio
- 05Recap - Safe UnwrappingChallenge
Operators Part 1
5 lessons534- 01Arithmetic OperatorsChallengeQuizAudio
- 02Modulo OperatorChallengeQuizAudio
- 03Compound AssignmentChallengeQuizAudio
- 04Recap - Simple MathChallenge
- 05Comparison OperatorsChallengeQuizAudio
Operators Part 2
5 lessons532- 01Logical Operators Part 1ChallengeQuizAudio
- 02Logical Operators Part 2ChallengeQuizAudio
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuizAudio
- 05Ternary OperatorChallengeQuizAudio
Decision Making
5 lessons534- 01If StatementChallengeQuizAudio
- 02If - ElseChallengeQuizAudio
- 03Recap - Simple CalculatorChallenge
- 04Switch StatementChallengeQuizAudio
- 05Switch With RangesChallengeQuizAudio
Basic IO
6 lessons634- 01Print FunctionChallengeQuizAudio
- 02String InterpolationChallengeQuizAudio
- 03ReadLine InputChallengeQuizAudio
- 04Type ConversionChallengeQuizAudio
- 05Recap - Till 120Challenge
- 06Recap - True or FalseChallenge
Bill Split Calculator
Project5 lessons1- 01Welcome MessageChallenge
- 02Getting InputProject
- 03Calculating Tip And TotalProject
- 04Splitting The BillProject
- 05Formatted OutputProject
Loops
9 lessons967- 01For-In LoopChallengeQuizAudio
- 02While LoopChallengeQuizAudio
- 03Repeat-While LoopChallengeQuizAudio
- 04BreakChallengeQuizAudio
- 05ContinueChallengeQuizAudio
- 06Recap - FactorialChallengeQuiz
- 07Ranges In LoopsChallengeQuizAudio
- 08Nested LoopChallengeQuizAudio
- 09Recap - Dynamic InputChallenge
Functions
7 lessons742- 01Declare A FunctionChallengeQuizAudio
- 02Parameters And ArgumentsChallengeQuizAudio
- 03Return ValuesChallengeQuizAudio
- 04Argument LabelsChallengeQuizAudio
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Default ValuesChallengeQuizAudio
FizzBuzz with a Twist
Project4 lessons1- 01Game OverviewChallenge
- 02The FizzBuzz FunctionProject
- 03Looping The NumbersProject
- 04Adding The TwistProject
Arrays Basics
7 lessons745- 01Declaring An ArrayChallengeQuizAudio
- 02Accessing ElementsChallengeQuizAudio
- 03Modifying ArraysChallengeQuizAudio
- 04Array MethodsChallengeQuizAudio
- 05Recap - Product ListChallenge
- 06Recap - Reversed ArrayChallenge
- 07TuplesChallengeQuizAudio
Iterating Over Sequences
4 lessons434- 01Iterating Over ElementsChallengeQuizAudio
- 02The Enumerated MethodChallengeQuizAudio
- 03Iterating Over Strings P1ChallengeQuizAudio
- 04Iterating Over Strings P2ChallengeQuizAudio
Arrays Advanced
4 lessons436- 01Array Slicing Part 1ChallengeQuizAudio
- 02Array Slicing Part 2ChallengeQuizAudio
- 03Sequence OperatorsChallengeQuizAudio
- 04The Contains MethodChallengeQuizAudio
Daily Expense Tracker
Project7 lessons1- 01Project OverviewChallenge
- 02Exit The ProgramProject
- 03Add ExpenseProject
- 04View All ExpensesProject
- 05Total And AverageProject
- 06Clear AllProject
- 07Handling ErrorsProject
Final Challenges
3 lessons3- 01Flat Asterisk PyramidChallenge
- 02Pattern FinderChallenge
- 03What To BuyChallenge
Why learn Swift with Coddy
- Write and run real Swift code in your browser. No Xcode install, no Mac required. Each lesson compiles your Swift program server-side and shows the output instantly, so you can learn Swift on Windows, Linux, or any machine.
- Modern Swift: variables and types, control flow, optionals, structs vs classes, protocols, generics, closures, error handling. The Swift foundations every iOS developer needs.
- AI hints help you read and fix Swift compiler errors and unwrap optionals correctly, so concepts like nil-safety and value vs reference types click instead of confusing you.
- Free Swift certificate when you finish the course. A credible signal for iOS, macOS, watchOS, and visionOS developer roles where Swift is the primary language.
Frequently asked questions about learning Swift
What is Swift programming used for?
Swift is Apple's primary language for building apps on iOS, iPadOS, macOS, watchOS, tvOS, and visionOS. The vast majority of new iPhone and Mac apps are written in Swift, and Apple's frameworks (SwiftUI, UIKit, AppKit) are designed around it. Outside Apple platforms, Swift is also used for server-side code, but app development is the dominant reason people learn Swift.
Is Swift hard to learn?
Swift is one of the more approachable strongly-typed languages. The syntax is concise, type inference removes a lot of boilerplate, and modern features like optionals and pattern matching are well-designed. The trickier parts (memory management with ARC, advanced generics, protocol-oriented programming) come later and are introduced gradually.
Can I learn Swift on Windows or Linux?
Yes. The course compiles Swift server-side, so you can learn the Swift programming language on Windows, Linux, or Chromebook with no Xcode and no Mac required. To actually ship iOS apps to the App Store you'll eventually need a Mac and Xcode, but you can learn the entire Swift language without one.
Should I learn Swift or Objective-C?
Swift, in almost every case. Apple has been steering developers toward Swift since 2014 — most modern iOS tutorials, sample code, and SwiftUI documentation are Swift-only. Objective-C still appears in older codebases, but Swift is the language for new iOS, macOS, and visionOS work.
How long does it take to learn Swift?
Swift basics — variables, control flow, functions, structs — take one to two weeks of daily practice. Becoming comfortable with optionals, classes, protocols, and closures usually takes one to three months. Going deeper into SwiftUI or UIKit to actually ship iOS apps is a separate ramp on top of the language itself.
Do I get a certificate after the Swift course?
Yes. Finishing the Swift course gives you a free certificate of completion you can add to your resume or share on LinkedIn — useful as a stepping stone toward iOS development with SwiftUI.