We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On topic 'Truthy and falsy' chapter 1, both editions;
The description of value type(string) which you can see on example:
The result is false if the string is empty (length is 0); otherwise, the result is true (length > 1).
Can be verify on output as true when val.length is 1. Using the same function example, below the table of truthy and falsy, we can see:
function testTruthy(val){ return val ? console.log('truthy') : console.log('falsy'); } testTruthy('a'); //true
The text was updated successfully, but these errors were encountered:
Thanks Bruno! Will review it and get back to you.
Sorry, something went wrong.
const testTruthy = (str = ``) => (str !== `` ? console.log(`truthy = ${str}`) : console.log(`falsy = ${str}`)); testTruthy(`abc`); // truthy testTruthy(``); // falsy testTruthy(); // falsy
added example from #31. Closes #31
98c96f5
Errata submitted for both editions. Exampled added and text will be corrected in next ed.
No branches or pull requests
On topic 'Truthy and falsy' chapter 1, both editions;
The description of value type(string) which you can see on example:
Can be verify on output as true when val.length is 1. Using the same function example, below the table of truthy and falsy, we can see:
The text was updated successfully, but these errors were encountered: