Choose where you’d like to start

clear

Table of Contents

Overview

The clear function empties a given collection.

Syntax

<collectionVariable>.clear();

where,

ParameterData typeDescription
<collectionVariable>

COLLECTION

The variable from which key value pairs or elements will be removed.

Examples

 productVersion = collection("Deluge" : 5, "CRM" : 2, "Mail" : 8);
 productVersion.clear();
 info productVersion; // Returns {}

Get Started Now

Execute