Contact: aviboots(AT)netvision.net.il
38,933 questions
50,642 answers
573 users
const arr = ["php", "typescript", "c++", "c", "nodejs", "javascript", "python"]; arr.sort((a, b) => (a > b ? 1 : -1)); console.log(arr); /* run: [ 'c', 'c++', 'javascript', 'nodejs', 'php', 'python', 'typescript' ] */