How to sort arrays containing special characters in js?

description

has an array, which can contain special characters such as -, * , and others are strings and numbers. How to sort this array?

var arr=[5,1,"aa",44,"-","cc","-"]

how do I sort the above array?

sort result:

[1 code >

Mar.02,2021

what do you need to line up


Array.sort () , the collation can be written by yourself
eg:

  

sort out the collation, and then write the corresponding function to ok

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44388-44a8a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44388-44a8a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?