Tad bit late on this, but hopefully helpful for future users:
The way this function is written is in the arrow function form but it's ultimately the exact same thing as doing the regular function declaration form that you wrote. Just returns 1 line instead and makes the code look more clean.
Tad bit late on this, but hopefully helpful for future users:
The way this function is written is in the arrow function form but it's ultimately the exact same thing as doing the regular function declaration form that you wrote. Just returns 1 line instead and makes the code look more clean.
It's probably a brittle solution, but for the strings provided ...
this one is the GOAT
This is probably best practices as well because it won't have a problem with null or undefined as toString() will.
Nothing wrong with that solution. Always good to practice the basics. Sometimes choosing to do it with a for loop is just good practice!
I was wondering how I could write a more concise arrow function for this. I'm very new to them obviously but this is great!
h2ker
dude! everyone falling for some smart methods, and then there is this guy...
I giggled when I saw this one lol
that was cheating rofl
genious
What if there nothing called needle ? Your code is gonna run without giving any index.
oof lol
Really???
hack
Thanks!
Loading more items...