I've looked at somewhat similar questions like this or this but they are answering a different question as they look at assignment operations. For example my code is
!item.completed ? addTask(item) : null
as I would like to execute a certain function if condition is met or do nothing if it's not met. My question is what would be considered a good practice to pass as an 'empty' 2nd expression?
I saw a lot of people using null, on the other hand I think that using an empty string '' is also a valid option as since there is no assignment happening an empty string is faster to type and doesn't seem to have any cons.
if.