In the past 2 weeks I have successfully (stumbled across) used this website to port parts of algorithms that I understand I will need but don't have the time to figure them out, (its not all good but it gives you some idea). Rossetta code contains lots of implementations of the same stuff in various languages. I use the Lua examples as they tend to port reasonably well to JavaScript.
(... apart from Lua is 1 indexed, .. means + and words replace oporators and braces, so you have to know the language a little.)
check it out.
https://rosettacode.org/wiki/Category:Programming_Tasks