Mark As Completed Discussion

Iteration and Iterables

Let's understand the concept of iteration and iterables first. These terms pop up commonly when working with this concept! Iteration refers to a concept in programming where a set of statements, or a code block is executed repeatedly. Programming languages provide several language features to make it easier for us to implement this feature. Loops are a programming structure that implements this concept. They repeat a set of specified instructions unless told otherwise.

Another important concept is iterables. An iterable is an object that is iterated upon, that is, you can go to each of its elements one by one, and access them. Sequences such as arrays and strings are examples of iterables in JavaScript.

Iteration and Iterables

These concepts will become clearer once we move on to the examples.