Learn Swift for Beginners 2026 - Lesson 11 - For Loops with Ranges
Machine-readable: Markdown · JSON API · Site index
Описание видео
In this lesson of the Learn Swift series, you'll learn how to use for loops with ranges — one of the most essential tools for writing clean, repeatable code in Swift.
Resources:
📚 Full guide:
https://codewithchris.com/learn-swift?utm_source=youtube&utm_medium=video&utm_campaign=learn_swift_lesson_11
Timestamps:
0:00 Introduction
0:20 Why use a for loop?
0:45 Writing your first for loop
1:32 Adding code inside the loop
1:58 Inclusive ranges explained
2:42 Using the loop variable (and underscore)
3:39 Stride: counting by custom steps
4:49 Challenge: multiplication table
5:57 Bonus: stride with even multiples
7:12 Wrap up & AI prompts
You'll learn:
✅ What a for loop is and why it's useful
✅ How to write a for loop using closed ranges and half-open ranges
✅ How to use the loop variable i — or ignore it with an underscore
✅ How to use stride to count by custom steps, including counting down
✅ A hands-on challenge: building a multiplication table
Whether you're brand new to coding or just starting out with Swift, this lesson breaks it all down step by step.
👉 Learn Swift playlist: https://www.youtube.com/playlist?list=PLMRqhzcHGw1bVghYq_TAiPeoKaBVlOJu5
#LearnSwift #SwiftProgramming #iOSDevelopment