...
/Coding Challenge: Working with Either and Pipe
Coding Challenge: Working with Either and Pipe
Let's use Either and Pipe in a function in this coding challenge.
We'll cover the following...
Problem statement
Given the two functions below, create a function called application
that takes a single parameter, hour
, of type number
and uses pipe()
to:
Check whether the hour is valid using the checkValidHour
function.
Change valid hours to the proper greeting using the mapToGreeting
function.
Fall back to unknown greeting
when the hour is invalid.
Try it yourself
Access this course and 1400+ top-rated courses and projects.