The alert and confirm in JavaScript are function call to display messages to the user. In this Javascript tutorial, we will see an example which uses both alert and confirm function calls.