Variable

Contents

◷ Reading Time: 1 minute

def

Defines a variable in the execution context

 def (name, value)
  • name (string): Name of the variable (Mandatory)
  • value: Value to be assigned. If no value is assigned, by default, it will be null (Optional)
Example: def ('defaultAmount', '5.00') 
Result: Create a variable called defaultAmount and assign 5.00 as the value
Example: def ('Name', 'Alex') 
Result: Create a variable called Name and assign Alex as the value
Example: def ('Department') 
Result: Create a variable called Department and assign null as the value

del

Deletes a variable from the execution context

 del (name)
  • name (string): Name of the variable to be deleted (Mandatory)
Example: del ('defaultAmount') 
Result: Deletes the variable called defaultAmount
Updated on January 12, 2021

Was this article helpful?

Related Articles