I get a boolean return when checking for a falsy value, but not a boolean when checking for a truthy value... I am just getting a string instead.
This works.
const isFalse = !values.firstName && !values.lastName && !values.email;
But this doesn't, as I get returned a string only.
const isValid = values.firstName && values.lastName && values.email;
Although, I can achieve the desired result with the following... It doesn't seem the best way forward.
const isValid = values.firstName && values.lastName && values.email ? true : false;
How would I be able to check the string for a truthy value and get boolean as a result (instead of a string)?