Arrays (dw::core::Arrays) Flashcards

1
Q

countBy

A

Counts the elements in an array that return true when the matching function is applied to the value of each element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

divideBy

A

Breaks up an array into sub-arrays that contain the specified number of elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

drop

A

Drops the first n elements. It returns the original array when n <= 0 and an empty array when n > sizeOf(array).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

dropWhile

A

Drops elements from the array while the condition is met but stops the selection process when it reaches an element that fails to satisfy the condition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

every

A

Returns true if every element in the array matches the condition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

firstWith

A

Returns the first element that satisfies the condition, or returns null if no element meets the condition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

indexOf

A

Returns the index of the first occurrence of an element within the array. If the value is not found, the function returns -1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

indexWhere

A

Returns the index of the first occurrence of an element that matches a condition within the array. If no element matches the condition, the function returns -1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

join

A

Joins two arrays of objects by a given ID criteria.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

leftJoin

A

Joins two arrays of objects by a given ID criteria.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

outerJoin

A

Joins two array of objects by a given ID criteria.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

partition

A

Separates the array into the elements that satisfy the condition from those that do not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

slice

A

Selects the interval of elements that satisfy the condition: from <= indexOf(array) < until

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

some

A

Returns true if at least one element in the array matches the specified condition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

splitAt

A

Splits an array into two at a given position.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

splitWhere

A

Splits an array into two at the first position where the condition is met.

17
Q

sumBy

A

Returns the sum of the values of the elements in an array.

18
Q

take

A

Selects the first n elements. It returns an empty array when n <= 0 and the original array when n > sizeOf(array).