<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Simple callback example</title>
  </head>
  <body>
    <script>
      function greet(name) {
        alert('Hello ' + name);
      }

      function processUserInput(callback) {
        let name = prompt('Please enter your name.');
        callback(name);
      }

      processUserInput(greet);
    </script>
  </body>
</html>
