The catch here is, the taskData.length can take any value from 0, 1, 2, 3, 4, and so on, and of all the value that it can take, there is only one falsy value, that is 0. The remaining all values correspond to truthy value. Also, it is a well known fact that the if statement passess for truthy value and fails for falsy values. Now go through the below line again and I hope you crack it !
You should create an if statement with the condition taskData.length
While your solution is completely fine and does the required task, this step demands you to do it in a less verbosal way.
It doesn’t ask for that in the text though. The way it is worded makes it sound like any solution you can come up with should pass (I can think of at least 6 ways of writing it, 10 if you count the different orders of checking the value).
It is just because we are using a regex.
Any valid solution should pass, or the text should specify the solution it requires.
Current hint:
You should create an if statement with the condition taskData.length.
Maybe this instead.
You should create an if statement with (taskData.length) as the condition. As a reminder, 0 is a falsy value.