JavaScript Comparator Function | Sorting Explained!
Ғылым және технология
How to take control of JavaScript’s sort function with the comparator function. JavaScript’s comparator function can help you sort numbers correctly, sort properties on objects correctly, and more. A Code Creative JavaScript tutorial created by Gregg Fine.
🎓 New Course Available! "Scrollytelling 101":
store.thecodecreative.com/scr...
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
store.thecodecreative.com/goo...
🗣JOIN the Code Creative Facebook group! :
/ 1612600368887577
🔴Subscribe for more free Code Creative videos: : / @thecodecreative
🌐 The Code Creative Official Website
www.thecodecreative.com/
🎓 The Code Creative Courses
www.thecodecreative.com/courses
✅ Recommended related videos:
Web Audio API: Exploring Oscillators
• Web Audio API - Oscill...
Web Audio API: createOscillator and Audio Nodes
• Web Audio API - create...
Web Audio API: What is Audio Context?
• Web Audio API - Audio ...
✅ For business inquiries contact me at gregg@greggfinedev.com
✅ Let's connect:
Twitter - @GreggFine
Instagram - /greggfinedev
Facebook - /hiddentigermusic
Пікірлер: 316
🎓 New Course Available! "Scrollytelling 101": store.thecodecreative.com/scrollytelling
not only did I fully learn and understand the logic behind the comparator function, but I also found myself starting to relax and peacefully enjoy learning it just by the cadence and tone of your voice. Thank you! Just subscribed
@TheCodeCreative
3 жыл бұрын
Excellent! Thanks for subscribing Roman!
@teenytinytoons
2 жыл бұрын
1000% percent. He's such a natural.
really hits the spot in my ADHD brain! glad I found this video. now I understand the comparator function much better!
@TheCodeCreative
3 жыл бұрын
That's great to hear Mondir. 👍🏻 Thanks for watching!
@Nightizm
2 жыл бұрын
couldn't' agree more!
Why this channel is so underrated? This guy is so good at explaining complicated things.
@TheCodeCreative
3 жыл бұрын
Thank you!
@afriroad
Жыл бұрын
So good!
holy smokes. the most thorough video on a comparator function ever. this made it really click for me. amazing walk-through and explanation.
@TheCodeCreative
2 жыл бұрын
Great to hear, thanks for watching!
finally someone explained this in such an easy manner.💕
@TheCodeCreative
3 жыл бұрын
Glad to hear!
underrated ytber , only vid on yt who perfectly explains the sorting method hats off bro ,
@TheCodeCreative
3 ай бұрын
I appreciate that!
you have no idea how much content i've watched until finding this video that made everything so clear for me! thanks a lot, Gregg!
@TheCodeCreative
Жыл бұрын
Glad it helped!
I have 4 best-rating courses on Udemy, but this teacher is THE BEST.
@TheCodeCreative
Жыл бұрын
Thank you for watching!
Amazing! Showing the reason why it is sorting the way it sorting was the best part! Thank you!
@TheCodeCreative
5 ай бұрын
Glad you enjoyed it!
why this video has so few views? he literally explained it in a way I'll never forget my entire life!
@TheCodeCreative
Жыл бұрын
Thank you, glad it was helpful!
for a channel that teaches this well it deserves more subs👍
@TheCodeCreative
2 жыл бұрын
Thank you so much 😀
Finally I understand Array Sorting. Thank you very much
@TheCodeCreative
3 жыл бұрын
Glad it helped!
Literally Perfect ! Just Perfect ! 😘
@TheCodeCreative
3 күн бұрын
Thank you so much!!
The most perfect explanation ever!
@TheCodeCreative
Жыл бұрын
Thanks, glad it was helpful!
i love how thorough you were. i watched it twice and now i can see so many ways that this will be useful.
@TheCodeCreative
2 жыл бұрын
Excellent, thanks for watching!
Finally, I understood the logic behind this "compareFunction" callback function. Thanks a lot.
@TheCodeCreative
Жыл бұрын
👍🏻👍🏻👍🏻
Thank you so much!!! This is one of the best explanation videos that I ever have seen about this topic.
@TheCodeCreative
23 күн бұрын
Glad it was helpful!
Hands down the best explanation, Thank you very much!
@TheCodeCreative
9 ай бұрын
Glad it was helpful!
Thanks my man! I'd been searching for a clear, straightforward, and hands-on explanation to no avail. That's until I got to your video. Great work!
@TheCodeCreative
Жыл бұрын
Great, glad it was helpful!
Wow!!! finally i understand this sorting topic in an easier way. The analogy in this video will help even a slow learners thanks
@TheCodeCreative
2 жыл бұрын
Glad it was helpful!
the only good video on basic sort so far
@TheCodeCreative
2 жыл бұрын
Glad it was helpful!
Explained it a lot clearer than other tutorials. You just earned another subscriber!
@TheCodeCreative
2 жыл бұрын
Awesome, thank you!
Really clear explanation. Love how you explain return logic and the charCodeAt logic. Thanks
@TheCodeCreative
10 ай бұрын
Glad you liked it
thank u! your channel is underrated
@TheCodeCreative
3 жыл бұрын
Thank you!
To subscribe to the channel: kzread.info/dron/mOpHGj4JRWCdXhllVTZCVw.html
THANK YOU! Keep up the good work!
@TheCodeCreative
2 жыл бұрын
Thank you!
Thanks!!, this was breaking my head. Greetings from Colombia.
@TheCodeCreative
2 жыл бұрын
Great, thanks for watching!
I finally understood the sort method and comparator function but what I don't understand is how come this guy only has around 8K subscribers!?? Given the quality of the content, imo he should have atleast half a million subs
@TheCodeCreative
Жыл бұрын
Thank you, working on it! :-) Happy New Year!
Thank you for this video . Just loved how you thoroughly explained everything . looking forward to learning more topics with you
@TheCodeCreative
3 жыл бұрын
Hey Mitch! Thanks for the comment. More videos coming soon 👍🏻
Thanks to this video I could do exercise number 8 of Jonas Schmedtmann's coding challenge about array methods! Thank you so much, nice voice btw!
@TheCodeCreative
10 ай бұрын
You're very welcome!
Sir, your way of explaining is too good, 💎
@TheCodeCreative
Жыл бұрын
Thanks Robin!
Wow! This video is amazing. I was trying to understand this function and how it works, and with your tips now I understood! Thankyou
@TheCodeCreative
3 жыл бұрын
Glad it was helpful to you Levi. Thanks for watching!
Thank you so much. a) Very organized explanation and easy to understand. b) Soothing voice in the midst of this confusion called learning. c) Liked and subscribed. Thanks again,
@TheCodeCreative
3 жыл бұрын
Great to hear, thanks for watching!
I wanted to thank you for the video, I could understand better the a-b logic, and I also had some fun while learning. Keep posting videos like this, means a lot for some of us, even when English is not our first language, we learn a lot.Thanks again.
@TheCodeCreative
3 жыл бұрын
That's great to hear. Thanks Ezequiel!
The best explanation ever.
@TheCodeCreative
2 жыл бұрын
Glad to hear! Thanks for watching 👍🏻
Seriously well explained! !
@TheCodeCreative
2 жыл бұрын
Thanks for watching Edwin!
Simple and concise. Thanks for the vid man!
@TheCodeCreative
2 жыл бұрын
Great, thanks for watching!
Clearly explained.Thank you
@TheCodeCreative
2 жыл бұрын
Glad it helped! Feel free to join the Facebook group: facebook.com/groups/thecodecreative
Wow you are very good! Probably the best in explaining the comparator function. So far, you might be the only one who show the respective utf code, and also be comprehensive enough to show for alphabets and numbers. Liked plus Subscribed!
@TheCodeCreative
2 жыл бұрын
Great, thank you! Glad it was helpful 👍🏻
Finally I could understand, thanks!
@TheCodeCreative
2 жыл бұрын
Glad it helped!
I was so confused before, thank you so much to explain this in such a simple and easier way.
@TheCodeCreative
11 ай бұрын
Great to hear!
thank you for explaining this in depth. Other people were just repeating what was written in w3schools website.
@TheCodeCreative
Жыл бұрын
Great, thanks for watching!
Spectacular explanation! really appreciate it, thxz man
@TheCodeCreative
2 жыл бұрын
Glad you liked it!
Thank you. Very well explained.
@TheCodeCreative
2 жыл бұрын
Thanks for watching!
This is great. Thank you very much!
@TheCodeCreative
Жыл бұрын
Glad it was helpful!
Exactly what I was looking for. Thank you!
@TheCodeCreative
2 жыл бұрын
Glad to hear! Thanks for watching!!
Thank You So Much. I've been flipping through hours of videos and documentations but still struggle to understand what the comparator function do. Your video definitely makes things clearer especially when you wrote out the if statements and have them return -1, 1, and 0. Everything just clicked.
@TheCodeCreative
3 жыл бұрын
Glad it helped!
This was great, thank you!!
@TheCodeCreative
4 ай бұрын
Glad it was helpful!
Just what I was looking for, very clear explanation. Thanks 👍
@TheCodeCreative
2 жыл бұрын
Great to hear!
Thank you so much, pretty clear explaination! subbed
@TheCodeCreative
3 жыл бұрын
Thanks for the sub!
Superb explanation , with meaningful insights!!!
@TheCodeCreative
3 жыл бұрын
Great to hear, thanks for watching!
Thanks man. This was helpful.
@TheCodeCreative
Жыл бұрын
Great to hear!
fantastic explanation !!!! , Thanks much!!!😀
@TheCodeCreative
2 жыл бұрын
Glad it was helpful!
amazing tutorial!! 😁
@TheCodeCreative
2 жыл бұрын
Cool, thanks!
such a good content! Keep up the good work. Thanks.
@TheCodeCreative
2 жыл бұрын
Thank you for watching!
Thank you, finally understood
@TheCodeCreative
2 жыл бұрын
Great! 👍🏻
Sir you are God sent! Thank you so much! It make perfect sense now.
@TheCodeCreative
2 жыл бұрын
Great! 👊🏻👍🏻
Thank you so much for your excellent explanation. Now I really do understand the logic behind those dubious comparator functions after having read it in a book. Great video! I subscribed right away
@TheCodeCreative
Жыл бұрын
Excellent!
I think I finally found the perfect pace and instructor….
@TheCodeCreative
2 жыл бұрын
Perfect! Thanks Dominik!
Im pretty sure you could teach an Ant to become an austronaut, but for real, i wasn't understanding it clearly but you made it simple for me, thank you!
@TheCodeCreative
Жыл бұрын
Glad I could help!
great explanation that I have ever seen, thank you
@TheCodeCreative
Жыл бұрын
Glad you enjoyed it!
Thanks! you explained this so clearly and thoroughly. Well done good sir.
@TheCodeCreative
2 жыл бұрын
Glad to hear, thanks for watching!
Very nice explanatory, thank you so much for that.
@TheCodeCreative
2 жыл бұрын
Thanks for watching!
Great explanation thanks 🙏
@TheCodeCreative
2 жыл бұрын
Thank you for watching!
Great teacher!
@TheCodeCreative
2 жыл бұрын
Thanks Dragan!
Superb explanation!
@TheCodeCreative
3 жыл бұрын
Glad it was helpful!
Great video! I am clearer on this topic now.
@TheCodeCreative
2 жыл бұрын
Excellent!
Excellent explanation.
@TheCodeCreative
2 жыл бұрын
Glad to hear!
superb .. thankyou for this
@TheCodeCreative
Жыл бұрын
Thank you too
Very well explained.
@TheCodeCreative
3 жыл бұрын
Thanks for watching!
That was just too good. Thank you so much for such a lucid explanation. Keep contributing your knowledge. There are very few people out there who can teach concepts in such detail.
@TheCodeCreative
2 жыл бұрын
Great, thanks! Glad it was helpful!
@abhigyansarmah716
2 жыл бұрын
@@TheCodeCreative It was indeed very helpful. Thanks again.
thank you very much you explained it very well
@TheCodeCreative
2 жыл бұрын
Thanks for watching!
Wow! You made that easy to understand for me. SUBSCRIBED
@TheCodeCreative
Жыл бұрын
awesome, thanks!
Thanks.. you just explained it in simplest way💖
@TheCodeCreative
2 жыл бұрын
Excellent, thanks for watching!
Finally! What a clear explanation, thank u!! I would love if you make a video explaining what return is :)
@TheCodeCreative
2 жыл бұрын
Do you mean "return" as in a return statement within a function?
@samuelpalacios9661
2 жыл бұрын
@@TheCodeCreative Yup, return statement within a function
great breakdown sub'd!
@TheCodeCreative
2 жыл бұрын
Great! 👍🏻👊🏻
Very good video with a good explanation!!
@TheCodeCreative
3 жыл бұрын
Thanks Sirin, glad to hear!
thank you sir for the beautiful explanation. You really deserve a lot more subs
@TheCodeCreative
Жыл бұрын
Thank you too
well explained sir, thank you :)
@TheCodeCreative
Жыл бұрын
Most welcome!
nice tutorial thanks!
@TheCodeCreative
2 жыл бұрын
👍🏻👍🏻👍🏻
Bro you deserve million of subscribers. I watched a lot of videos before i finally found this masterpiece. Thank you so much it really helped a lot. Hope our professors would teach the way you do.
@TheCodeCreative
Жыл бұрын
Thank you so much 😀 It's encouraging to know that the videos are helpful. 👍🏻
Thank you, It was really useful
@TheCodeCreative
4 ай бұрын
Glad to hear that!
Good video, thank you!
@TheCodeCreative
3 жыл бұрын
Thank you for watching!
Thank you so much for this
@TheCodeCreative
Жыл бұрын
You're so welcome!
thanks for the teaching
@TheCodeCreative
Жыл бұрын
Thank you for watching!
Thanks for your explanation make me understand about sort function javascript👍
@TheCodeCreative
2 жыл бұрын
Excellent! Any other topics you'd like to see a video on?
Loved it you teaching so good Thank you :)
@TheCodeCreative
10 ай бұрын
Glad it was helpful!
wow thank you well explained
@TheCodeCreative
Жыл бұрын
Glad it was helpful!
THANK YOU FROM MY HEART
@TheCodeCreative
2 жыл бұрын
Thank you for watching!
Thanks :) subbed right away 😅
@TheCodeCreative
9 ай бұрын
Thanks for the sub!
Join "The Code Creative Community" group on Facebook: facebook.com/groups/thecodecreative
you are the best explainer thank you so much
@TheCodeCreative
Жыл бұрын
Thank you!
so good thanks!
@TheCodeCreative
8 ай бұрын
Thank you too!
Thanks man !
@TheCodeCreative
2 жыл бұрын
You're welcome!
Wow! Good job mate! Very well explained. New sub. 👍🙋🇲🇽😁
@TheCodeCreative
3 жыл бұрын
Thanks Ricardo and thanks for watching!
i encourage you to do more tutorial , i never have i ever commented on some tutorial videos this was the first one the way that you explain is was so good ,keep doing it
@TheCodeCreative
3 жыл бұрын
Great to hear, thanks for watching!
thank you so much!!
@TheCodeCreative
2 жыл бұрын
Thanks for watching!
Woow Thank Budy !!! Finally i understand a-b or b-a Thank You So Much Brother Keep It Up
@TheCodeCreative
3 жыл бұрын
That's great to hear, thanks for watching!
You are really good!
@TheCodeCreative
Жыл бұрын
Thanks Lucas!