#
DIFF.BLOG
New
Following
Discover
Jobs
More
Top Writers
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Privacy
+
Create new post
Create new blog
Add your blog
Sign up
The home for great developer writing.
We surface the best developer writing from thousands of independent blogs, updated daily.
Join Diff.blog
TOPICS
How to write JavaScript sort comparators
·
Flaviocopes
·
July 30, 2026, 8:16 a.m.
Javascript
Sort Comparators
programming techniques
Web Development
Summary
This blog post explains how to write sort comparators in JavaScript, detailing key topics such as the return value contract, pitfalls in string sorting, techniques for multi-key sorting, and the usage of localeCompare and Intl.Collator.
Read full post on flaviocopes.com →
MORE POSTS LIKE THIS
How to Build a Browser-Based PDF to Grayscale Converter Using JavaScript
freeCodeCamp.org ·
Aug 14, 2026
Javascript
Web Development
How JavaScript call, apply, and bind Actually Work
jsdevspace ·
May 20, 2026
Javascript
programming techniques
Chrome’s V8 JavaScript Engine: How JavaScript Really Runs at Lightning Speed
malik-arsalan00 ·
Jan 13, 2026
V8 JavaScript Engine
Javascript
Learning web development: JavaScript Maps
Axel Rauschmayer ·
Aug 30, 2025
Javascript
data-structures
How to move the first element to the end in JavaScript
Josh Sherman ·
Feb 16, 2025
software development
Javascript
Getting started with WebMCP: building and testing tools
Polypane ·
Nov 24, 2026
WebMCP
AI agents
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub
Continue with Google
By continuing, you agree to our
Privacy Policy
.