Explore the bog standard for loop, incrementing up or down in steps.
- [Instructor] When we talk about programming computers…it's always with a goal of making the machine…do something that maybe we're not so good at…or maybe we just don't want to.…One of the things that a computer can do really well…is the same thing over and over again.…So what I'm talking about is called looping.…In this lesson we're going to talk about for-loops,…specifically we're going to talk about sequential for-loops.…This is a way of telling the machine…to do something over and over and over again…a certain number of times.…And it looks like this.…You write the word for and then in some parentheses,…you'll put three statements, followed by a curly brace.…
What we're planning to do here is something 10 times.…And the first thing I'm going to do…is initialize a variable.…It's kind of a convention in for-loops to use I,…which stands for index, and set it to zero.…What this is called and what value you set it to…are completely up to you…and the requirements of the program that you're writing.…Then we add a semicolon.…
- Using a text editor
- Declaring and assigning variables
- Booleans and the quest for truth
- Working with objects and arrays
- Using operators and control structures
- Iterating with loops
- Objects, references, and functions
- Promises, async, and await
Skill Level Beginner
1. Getting Started
2. Variables and Types
3. Objects, Arrays, and More
4. Operators and Control Structures
5. Iterating with Loops
7. More Advanced Pieces
Next steps3m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.