intersect()
Table of Contents
Overview
The intersect() function takes listVariableOne and listVariableTwo as arguments, and returns a list containing common elements from both the given lists.
Return Type
- List
Syntax
<variable> = <listVariableOne>.intersect( <listVariableTwo> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned list. | LIST |
<listVariableOne> | The first list variable from which the common elements will be returned. | LIST |
<listVariableTwo> | The second list variable from which the common elements will be returned. | LIST |
Examples
listOne = {"Zoho Creator", "Zoho CRM", "Zoho Projects"};
listTwo = {"Zoho Mail", "Zoho Analytics", "Zoho Creator"};
commonList= listOne.intersect(listTwo); //returns {"Zoho Creator"}
listTwo = {"Zoho Mail", "Zoho Analytics", "Zoho Creator"};
commonList= listOne.intersect(listTwo); //returns {"Zoho Creator"}