Functional Programming, JavaScript.
findMonthName(months, 13).getOrElse('No month found'); As you can see this function keeps its contract by returning an Optional object to encapsulate success and failure states. Here is another use case for this functional pattern. Consider the following simple objects: function Address(country) {