Halloween Day

Published by BijogFc24 in

Create a function that takes date in the format yyyy/mm/dd as an input and returns "Bonfire toffee" if the date is October 31, else return "toffee".

Examples

halloween(new Date("2013/10/31")) ➞ "Bonfire toffee"

halloween(new Date("2012/07/31")) ➞ "toffee"

halloween(new Date("2011/10/12")) ➞ "toffee"

Notes

N/A

Watch a quick demo on how Edabit works.