How To Loop

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

for loop

classic index based loop

2
New cards

while loop

loops while a condition is true

3
New cards

do...while loop

runs at least once, then continues while condition is true.

4
New cards

for...of loop

loops through iterable objects (like arrays, strings, etc.)

5
New cards

for...in loop

through enumerable properties of an object (keys).

6
New cards

.forEach() method

Array method for looping

(not breakable with break or return)

7
New cards

.map() method

transforms each element in an array and returns a new array.

8
New cards

.filter() method

Filters an array based on a condition, returns a new array.

9
New cards

.reduce() method

Reduces array to a single value.