<body>
      <p>Why you should get a Tesla</p>
      
      <form>
         <input type="button" value="Find Out!" onclick="myFunction();" />
      </form>
      
   </body>
function myFunction()
            {
               var passenger = 50;
               
               try {
                  alert("The bus can sit " + passenger + " people" );
               }
               
               catch ( e ) {
                  alert("Error: " + e.description );
               }
               
               finally {
                  alert("But my Tesla still rocks!" );
               }
            }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.