Created
July 17, 2024 20:44
-
-
Save IAmAnubhavSaini/8c8290eb1c4a2ce68fc7eef321d25ba2 to your computer and use it in GitHub Desktop.
have fun with javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort(); | |
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort((a, b) => a - b); | |
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort((a, b) => b - a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment