Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
great, I agree, your code should be short and fast at the same time.
how long have you been doing this?
some body please, call 911. man has a stroke
why?
This comment has been reported as abusive
This solution only works due to incomplete testing. It checks whether a is truthy. Here are some possible falsy cases in JavaScript:
false,
null,
0,
NaN,
"" (empty string),
undefined
So if you have any value other than these, such as a string like "abc" or simply the boolean true, this function wouldn’t work.
Additionally, even though this is a function expression, which is good practice, you should use the const keyword. Not using it is considered bad practice. And don’t forget the semicolon at the end.
Not entirely true since null or an empty array are falsy. Though when you get a string or a number other than 0, those are truthy. Or what if you have a variable with "true" as its value? Your solution is correct though.
isnt every method a loop?
very short way. it's great.
Yep. I was come back here to say exactly this.
fixed by disabling older Node versions
"TypeError: Array.from(...).flat is not a function"
It's passing all tests but one. Sounds a test case issue.
great)
unary plus... good)))
very clean
Loading more items...