Choose where you’d like to start

distinct()

Overview

The distinct() function takes a listVariable as argument, and returns the list only with unique values in it.

Return Type

  • List

Syntax

<variable> = <listVariable>.distinct();
ParameterDescriptionData type
<variable>Variable which will contain the returned list.LIST
<listVariable>The list from which only unique elements will be returned.LIST

Examples

 listVar = {"1", 1, 1, 2, 2, 3};
 uniqueList = listVar.distinct();             
 Info uniqueList;
 //returns {1, 1, 2, 3}

Get Started Now

Execute