Halloween Day

Published by Jonny McHugh Shepherd 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("2013/10/31") ➞ "Bonfire toffee"

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

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

Notes

N/A

Watch a quick demo on how Edabit works.