JSFiddle - React, Tailwind, and code Playground

by Vladymyr Shevchuk

JavaScript

const list = ['ёлка', 'арбуз'];

const result = list.slice().sort(function (a, b) {
   return a - b;
   // return a.localeCompare(b);
});

console.error('result', result);