<p>How many people can the coach sit?</p>

  <form>
    <input type="button" value="Let's see" onclick="myFunction();" />
  </form>

 function myFunction() {
   var passenger = 50;
   try {
     alert("The coach can sit " + passenger + " people.");
   } catch (e) {
     alert("Error: " + e.description);
   }
 }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.