Your writing is really concise, but I find it executes two extra operations. Under the hood, it converts to boolean, the main intent, then operates "!" twice.
Plus it is harder to read, as the double negation isn't the main propose of the code, but the undelrying conversion that takes place.
it's a solution if it passes the test cases.
Is it a solution when, instead of implementing the solution, the function just calls another function that solves the problem?
Your writing is really concise, but I find it executes two extra operations. Under the hood, it converts to boolean, the main intent, then operates "!" twice.
Plus it is harder to read, as the double negation isn't the main propose of the code, but the undelrying conversion that takes place.
if you're just evaluating if something is truthy or falsey, this is a much more concise method:
nice!!!