Use forEach method instead of for statement.