Skip to content
New issue

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

truthy fn #11

Open
ecasilla opened this issue Aug 15, 2015 · 0 comments
Open

truthy fn #11

ecasilla opened this issue Aug 15, 2015 · 0 comments

Comments

@ecasilla
Copy link

Im not sure if this is the correct implementation of the truthy function as 0 & ' ' are both falsey values in javascript which is confusing..

I think you should use the boolean operator to tell if the value is truthy

function truthy(x){ return !!x; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant