Returns the value if defined, otherwise 0.
The value to check
The value or 0
const val = nullishToZero(null); // 0 Copy
const val = nullishToZero(null); // 0
Returns the value if defined, otherwise 0.