JavaScript Comparator Function | Sorting Explained!

preview_player
Показать описание
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":

📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:

🗣JOIN the Code Creative Facebook group! :

🌐 The Code Creative Official Website

🎓 The Code Creative Courses

✅ Recommended related videos:

Web Audio API: Exploring Oscillators

Web Audio API: createOscillator and Audio Nodes

Web Audio API: What is Audio Context?

✅ Let's connect:

Twitter - @GreggFine

Instagram - /greggfinedev

Facebook - /hiddentigermusic
Рекомендации по теме
Комментарии
Автор

really hits the spot in my ADHD brain! glad I found this video. now I understand the comparator function much better!

mondirhallouli
Автор

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

romanmontoya
Автор

Why this channel is so underrated?
This guy is so good at explaining complicated things.

abrarraemrifat
Автор

holy smokes. the most thorough video on a comparator function ever. this made it really click for me. amazing walk-through and explanation.

teenytinytoons
Автор

I have 4 best-rating courses on Udemy, but this teacher is THE BEST.

kerisek
Автор

finally someone explained this in such an easy manner.💕

numanakhtersiddiqui
Автор

underrated ytber, only vid on yt who perfectly explains the sorting method hats off bro,

ChabPoha
Автор

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!

Kattayopp
Автор

Amazing! Showing the reason why it is sorting the way it sorting was the best part!
Thank you!

e-prog
Автор

why this video has so few views? he literally explained it in a way I'll never forget my entire life!

MrRameez
Автор

for a channel that teaches this well it deserves more subs👍

omarvayani
Автор

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,

farazk
Автор

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.

locle
Автор

Finally I understand Array Sorting. Thank you very much

sumon
Автор

Thank you so much!!! This is one of the best explanation videos that I ever have seen about this topic.

victoriapanidi
Автор

Wow!!! finally i understand this sorting topic in an easier way. The analogy in this video will help even a slow learners thanks

atmsudawa
Автор

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

syedzidane
Автор

Finally, I understood the logic behind this "compareFunction" callback function. Thanks a lot.

arinzeodukwe
Автор

i love how thorough you were. i watched it twice and now i can see so many ways that this will be useful.

rich
Автор

Really clear explanation. Love how you explain return logic and the charCodeAt logic. Thanks

tenzinwoeser
welcome to shbcf.ru