Array Functions in Fusion Flashcards

1
Q

What function adds values specified in parameters to an array and returns that array?

A

add (array; value1; value2; …)

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

What verifies if an array contains the value?

A

contains (array; value)

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

What removes duplicates inside an array?

A

distinct (array; [key])

*It uses the “key” argument to access properties inside complex objects. To access nested properties, use dot notation. The first item in an array is index 1.

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

What creates a new array with all sub-array elements concatenated into it, recursively, up to the specified depth?

A

flatten (array)

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

What concatenates all of the items of an array into a string, using the specified separator between each item?

A

join (array; separator)

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

What returns an array of the properties of a given object or array?

A

keys (object)

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

What returns the number of items in an array?

A

length (array)

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

What returns a primitive array containing values of a complex array? This function allows filtering values. Use raw variable names for keys.

A

map (complex array; key;[key for filtering];[possible values for filtering])

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

What merges one or more arrays into one array?

A

merge (array1; array2; …)

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

What removes values specified in the parameters of an array? This function is effective only on primitive arrays of text or numbers.

A

remove (array; value1; value2; …)

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

What array makes the first element of the array become the last element, the second element becomes the next-to-last element, and so on?

A

reverse (array)

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

What returns a new array containing only selected items?

A

slice (array; start; [end])

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

What formula is used to sort values of an array?

A

sort (array; [order]; [key])

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

What are the valid values of the order parameter for a sort array?

A

asc - ascending order
desc - decsendign order
asc ci - case insensitive ascending order
desc ci - case insensitive descending order

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

What formula returns the difference between two arrays?

A

arrayDifference [array1, array2, mode]

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

What are the two values that can be used for the mode parameter of an arrayDifference formula?

A

classic - Returns a new array that contains all elements of array1 that do not exist in array
symmetric - Returns an array of elements that are not common to both arrays

17
Q

What function converts a collection into an array of key-value pairs?

A

toArray