Javascript Lecture Notes

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

1/9

flashcard set

Earn XP

Description and Tags

Flashcards on Array Methods, Spread and Rest Operators and Destructuring

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

forEach

Executes a provided function once for each array element.

2
New cards

map

Creates a new array with the results of calling a provided function on every element in the calling array.

The map method does not alter the original array; it applies a function to each element and returns a new array with transformed elements. This is useful for transforming data in arrays.

3
New cards

filter

Creates a new array with all elements that pass the test implemented by the provided function.

4
New cards

some

Tests whether at least one element in the array passes the test implemented by the provided function. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false.

5
New cards

every

Tests whether all elements in the array pass the test implemented by the provided function. It returns a Boolean value.

6
New cards

reduce

Executes a reducer function (that you provide) on each element of the array, resulting in single output value.

7
New cards

Spread Operator

Expands an iterable (like an array) into multiple values.

8
New cards

Rest Operator

Allows a function to accept an indefinite number of arguments as an array.

9
New cards

Destructuring

A way to extract multiple values from data stored in arrays and objects and assign them to variables.

10
New cards

mergeObjects

function that accepts two objects and returns a new object which contains all the keys and values of the first object and second object.