Skip to main content

table.clear()

Removes all of the items from a table

Availability

Device + Agent

Returns

Nothing

Description

This method removes and deletes every slot from the target table.

Example Code

// Establish a table for application settings
appSettings <- {};
// Define HTTP Request Handler function
httpRequestHandler(request, response) {
try {
if ("clearprefs" in request.query) {
// User wants to put settings to defaults
appSettings.clear();
applyDefaultSettings();
}
} catch (exception) {
response.send(500, "Server error: " + exception);
}
}
// Register HTTP Request Handler function
http.onrequest(httpRequestHandler);