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.
Why not try thinking through it with an example and see if with notetaking, you can find a solution that works for you!
Example, imagine an infinite list of ascending numbers:
[1, 2, 3, 4, 5, 6, 7, ...] # find a sum 7
As you go through the list, would you need to parse to infinity to know what values add up to 7? In this constrained example, the fact that ther numbers are ordered gives you the advantage to know that once we're past values that can sum up to 7, that you don't need to look further.
Beyond that, you know by the time you hit
[3, 4]
that there's a matching pair, and you didn't even need to look past the 4th value in that list!The JavaScript code isn't executed by the browser, but by Node JS. It's a runtime to run JavaScript outside a browser (in this case: Codewars's server). So it doesn't matter whether you use Chrome/Firefox/etc.
can you recommend any reading material for it?
No.
Basically you are asigning value to your key inside object count.
(count[s] || 0) + 1 means that if there is no value(count) of that specific letter, value 0 is being assigned to it and then it is increased by 1.
If we encounter a letter which count is bigger than 1 (not 0 or undefined) than we reach that value and add 1 to it.
Not a kata issue, do read this to solve your doubts->> https://deploy-preview-189--reverent-edison-2864ea.netlify.app/training/troubleshooting/