Theme

For Loop Filtering

Filtering is the process of including/excluding items in an array based on certain condition.

You can go through all items in JavaScript using either:

  1. Traditional for loop
  2. for...of loop

for...of loop is easier to read, but you do not have access to index variable.