When we talk about programming computers, it's always with the goal of making the …machine do something that we're maybe not so good at. …Or, maybe we don't want to do. One of the things that a computer can do …really well is do the same thing over and over again. …So, what I'm talking about, is called looping. …And in this lesson, we are going to look at for loops. …Specifically we're going to look at sequential for loops. …So what this is is a way of telling the machine to do something over and over and …over again a certain number of times. It looks like this: you write the word …for, and then in some parentheses you put three statements.…
First, you initialize some sort of variable. …So what we're going to do here is do something ten times. …So I'm going to start by creating a variable, and typically when you see for …loops in the wild, the variable that you're initializing will be called i, for …index, it's just sort of a convention. But you can call it anything you want. …I will be set to, again, canonically as we've seen with arrays, when they're zero …
- Enabling Firebug and web inspectors
- Using a text editor
- Declaring and assigning a variable
- Booleans and the quest for truth
- Working with objects and arrays
- Using operators and control structures
- Iterating with loops
- Objects, references, and functions
- Understanding variable scope
Skill Level Beginner
Q: In "How to enable Firebug and web inspectors," at the Chrome Canary part, the author mentions going to the View menu, and then Developer. My Canary has no menu bar. The author uses a Mac, whereas I have Windows. How do I get to the same place?
A: Click the menu button at the top right of Chrome, select More Tools, and then choose Developer Tools.
1. Getting Started
Our friend, the text editor3m 35s
2. Variables and Types
3. Objects, Arrays, and More
4. Operators and Control Structures
5. Iterating with Loops
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.