Functional Programming, JavaScript.
code: var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; function getMonthName(mo) { if (months[mo - 1] !== undefined) { return months[mo - 1]; } else { throw new Error("Invalid Month Error!"); } } It’s clear that for every valid month number, this