---
title: "Discussion on \"Why sort() in Javascript not sorting... 🤔\" | Hashnode"
description: "Discussion on \"Why sort() in Javascript not sorting... 🤔\". Although I have being using Javascript for a while now but never solved a leetocode problem using it so I tried solving a basic problem using Javascript, and tried to play around. What I found was very \"weird\"...\nSo I was trying to sort an array of n..."
url: "https://hashnode.com/posts/why-sort-in-javascript-not-sorting/64b537910b26e88ae4a5a9c1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why sort() in Javascript not sorting... 🤔](https://devanshnigam.dev/why-sort-in-javascript-not-sorting?utm_source=hashnode&utm_medium=feed)

Although I have being using Javascript for a while now but never solved a leetocode problem using it so I tried solving a basic problem using Javascript, and tried to play around. What I found was very "weird"... So I was trying to sort an array of n...

Jul 17, 2023 · 2 min read · devanshnigam.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#sorting](https://hashnode.com/tag/sorting)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Devansh Nigam](https://hashnode.com/@DevanshNigam)

@DevanshNigam · India

  
[View profile](https://hashnode.com/@DevanshNigam)

Undergrad | Coding | MERN | Open to work 👨‍💻

Hello there! I'm a 22-year-old Backend developer studying towards a Bachelor's degree in Technology. I absolutely love writing blogs where I can share my thoughts and ideas, especially when it comes to the ever-changing world of JavaScript and its many libraries. I'm always excited to learn and keep up with the latest developments in this fast-paced field, so I can create informative and interesting content for others to enjoy.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
