trekhleb / javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
MIT License
185.07k stars 29.85k forks source link

Changed the BinarySearch component from a function to an arrow function. #999

Open Ben-lad opened 1 year ago

Ben-lad commented 1 year ago

Changed the BinarySearch component from a function to an arrow function.

The original component was defined using the function keyword, but I updated it to use an arrow function instead. This change provides a more concise syntax and also avoids any issues with the binding of the "this" keyword.

I have tested the updated component and verified that it works as expected.

Thanks for considering this change!

lazarljubenovic commented 1 year ago

It's a top-level function. There's no issue with "this", nor is it more concise. Also it's not a component.

Consider common sense before spamming multiple repositories with the same artificial-not-so-intelligent type of changes.

iamleomoko commented 1 year ago

It's a top-level function. There's no issue with "this", nor is it more concise. Also it's not a component.

Consider common sense before spamming multiple repositories with the same artificial-not-so-intelligent type of changes.

don't that hard on the guy, he might still be learning and just wants to contribute.

lazarljubenovic commented 1 year ago

I looked at his profile; he had the same comments in other repos. It's a bot.

Ben-lad commented 1 year ago

@lazarljubenovic I'm really sorry for that, if that make you angry. I'm not a bot just still learning as @iamleomoko said, and am looking for something small to change in the code. I'll delete this now So am really sorry once again.

@iamleomoko Thank you for saying that.