distinct()

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();             
//returns {"1", 1, 2, 3}

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com