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.
This is beautiful
whole numbers, integers, and decimals, floats, are different kinds of numerical data. There is no need to worry about floats because that isnt the data being tested.
this is simple solution!!!
Yes, in your case an empty array is acctually seen true in js.
The Boolean callback fn passed in the filter method only FILTERS those who are falsy, and if you are not sure which vals in js are falsy, this link may help:"https://developer.mozilla.org/en-US/docs/Glossary/Falsy".
Again, the result is 3 in your case and it's acctually prove this solution is right, cause only falsy vals are filtered.
Hope my belated comment helps!
Doesn't this return
" "
instead of""
for an empty string? I thought I tried this code and it errored ...Edit: I just tried it out and it didn't error. Never Mind. I guess it doesn't join on an empty string (
""
) because there is nothing to join.Always the one liners! Great solution
Learned a new method, thanks!
Wow! I like this solution! So simple!
well it took me quite long to do it and while checking others solution,it looks like how easy it was but wasn't for me and now it is.
so clever
Nice One ❤👑
That's precisely what the Kata assumes.
This comment is hidden because it contains spoiler information about the solution
let arr = [[ ], true, [ ]];
results in length of 3 for me. So that it should not work.
EDIT: My Bad, [] is not to check for!
what are you trying to say?
Loading more items...