Drop variable
Use the Drop variable statement to drop a script variable during script execution. When a variable is dropped, it is not available or visible, for example, in sheet view.
Both drop variable and drop variables are allowed forms with no difference in effect.
Syntax:
Drop variable variablename {, variablename2 ...}
Drop variables variablename {, variablename2 ...}
Examples:
Drop variable MyVarToDrop1;Drop variables MyVarToDrop2, MyVarToDrop3;When to use a Drop variable statement
Drop variable statements are useful for separating script development from sheet development. You can use a variable to perform calculations or for loading specific data only, without adding clutter to the sheet-building experience. If you have many variables and a large volume of data to load with the script, dropping variables early in the script can help reduce memory usage and increase performance.