Javascript to convert between states and abbreviations

In this post, Sean Barton provides a nifty script for converting between U.S. states and their abbreviations.
I needed this functionality in js/jquery, so here it is! Feel free to convert this to plain javascript.

Updated to reflect Aaron St. Clair’s syntax suggestions.

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *