Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- It can be hard to keep track of what’s truthy or falsy in JavaScript. Write a function, truthyOrFalsy(), that takes in any value and returns true if that value is truthy and false if that value is falsy.
- */
- let truthyOrFalsy = arg => {
- if(arg) {
- return true;
- }
- return false;
- }
- console.log(truthyOrFalsy(0));
Advertisement
Add Comment
Please, Sign In to add comment