Pop-Last-Element
Command Description
Pop the last element of the array
Command Prototype
item = pop(array)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
array | True | expression | [] | Need to delete and return the last element of the array |
return
item,The variable used to save the output of the command.
Demo
TracePrint("----------------------Remove and return last element-------------------- ----")
//-------------------------------------------------------------------------------
//[Remarks] Delete and return the last element of the array.
//Input parameter 1:
// array--The array that needs to remove and return the last element of the array.
//out parameters:
// item--The variable to which the output of the function call is saved.
//
//Command prototype: item=pop(array)
//-------------------------------------------------------------------------------
item=pop(["a","b","c"])
TracePrint(item)