DEV Community

Discussion on: Day-2: 30 days of code- Hackerrank

Collapse
dakujem profile image
Andrej Rypo

My bad... "Find and print"... the task is flawed 🤷‍♂️
Anyway, much better to write console.log(solve(...)) and return a result than print within the working function and retun nothing.

Collapse
pranav589 profile image
pranav589 Author

It passed all the test cases provided by HackerRank. And ya thanks for your advice. It'll help me in the future for sure.