alert()
Last updated 24/03/2026
Definition
alert() is a function on the Five object
that displays a dialog message.
Examples
Basic alert with just a message
This code displays an alert dialog to the user with the message "Failed to create customer record".
Alert to display if a customer record was not created
five.alert('Failed to create customer record';)
Alert with a callback
This code displays an alert notifying the user that the customer record creation failed. The user must acknowledge the message, and an optional
callback
logs the error to Five's
Inspector.
Alert to display if a customer record was not created with an optional callback parameter
five.alert('Failed to create customer record', () => {
five.log('Error creating customer record : ' + err.message);
})