Skip to content

Instantly share code, notes, and snippets.

@podfeet
Last active November 5, 2019 04:01
Show Gist options
  • Save podfeet/bae6410021a2f0d91e4a03bb03e4458b to your computer and use it in GitHub Desktop.
Save podfeet/bae6410021a2f0d91e4a03bb03e4458b to your computer and use it in GitHub Desktop.
<!-- This Page's Local JavaScript Code -->
<script type="text/javascript">
//
// Define global variables for examples
//
// an array with the names of the days of the week
var days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
// a regular expression for matching dollar ammounts
// the first capture group matches the number of dollars
// the second capture group matches the number of cents, if any
var dollarAmountRE = /[$](\d+)(?:[.](\d{2}))?/;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment