Contact: aviboots(AT)netvision.net.il
39,851 questions
51,772 answers
573 users
let arr = ["php", "typescript", "c++", "c", "nodejs", "javascript"]; arr = arr.sort((a, b) => (a > b ? -1 : 1)); console.log(arr); /* run: [ 'typescript', 'php', 'nodejs', 'javascript', 'c++', 'c' ] */