A programmer should use a language as a tool, always taking advantage of language-specific data types and built-in functions.
Public questions (free plan) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
Modify the ensure function so that it throws an error if called without arguments or an argument is undefined. Otherwise it should return the given value.
- No arguments: Wrong answer
- Truthy argument: Wrong answer
- Falsy argument: Wrong answer