As we start writing more complicated code, it is both necessary and desired to not repeat ourselves. This concept in programming is known as DRY, or Don’t Repeat Yourself. This concept becomes really important when we're working with large datasets. For example, imagine you find yourself wanting to create 10 new rows on a table. You could write the same code ten times in a row, but that would neither be efficient nor a good use of your time.
To avoid repeating ourselves, we use loops and iteration, and JavaScript has a ...