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.
They chat gpt'd it, that is where the map is coming from XD
only until you try to put that in TypeScript — https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABACxgc2QQTAEwDJwDuAFGCALYBGApgE4DOAXIvVLTGGgJQDeAUIkQAbalEQBDWrUQBeRGSp16AOnoAHITCjEA5Ih1dEAeiPLy4tcQByFGrS4BuQQMS1RIWkgCy4qMjPiAB7EyqGS9ogA1Pox0T5+ZhwhYVKOfAC+QA — if you want to find a job, very likely it will be of writing TS, not JS
You need a an array or a string to use a for loop or I'm not understanding what you are implying.
Exactly, the 'and' parts are redundant due to the 'return' statements.
thx well explained!
The description seems pretty clear to me, what part aren't you understanding?
Your function gets a number, let's say
5
You need to convert it to a binary string, in this case it would be
"101"
Then you need to return the amount of
"1"
s in that binary string,2
That's it.