array.toSet()

Convert a Array to an Set.

Signature

toSet() => Set

Description

The toSet() method converts the Array instance to a Set.

The source Array isn’t changed.

Parameters

None

Return value

Type Description

Set

Set representation of the Array instance.

Examples

[1, 2].toSet()
{
  data: [
    1,
    2
  ]
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!