**We can disagree and still be friends.**
I build bridges and tools for others to use.
I maintain and improve a lot of legacy code, monoliths, services.
I spend my free dev-time on FOSS packages.
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.
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.It passed all the test cases provided by HackerRank. And ya thanks for your advice. It'll help me in the future for sure.