Fork this repo and clone it on your computer,git clone
.
Story Your online store likes to give out coupons for special occasions. Some customers try to cheat the system by entering invalid codes or using expired coupons.
Task Your mission: Write a function called checkCoupon which verifies that a coupon code is valid and not expired.
A coupon is no more valid on the day AFTER the expiration date. All dates will be passed as strings in this format: "MONTH DATE, YEAR".
To test your solution, run npm i
in the root directory and then run npm t
to run the automated tests.
Once you're finished git push
and submit a pull request to:
https://github.com/sh-happens/The-Coupon-Code.git