Using JavaScript to Avoid a Train Wreck

Demonstrating the value of functions by determining the timing of a train wreck