 fromMaybe 0 (Just 3) -- returns 3
fromMaybe "" (Nothing) -- returns ""

JavaScript's nearest operator is codice_4, the "nullish coalescing operator," currently a Stage 4 proposal with a Babel plugin and TypeScript support.It evalutes its left-hand operand and, if the result value is not "nullish" (codice_18 or codice_19), takes that value as its result; otherwise, it evaluates the right-hand operand and takes the resulting value as its result.In the following example, codice_20 will be assigned the value of codice_21 if the value of codice_21 is not codice_18 or codice_19, otherwise it will be assigned 3.
const a = b ?