I have an array of strings, like so
let array = ['Enflure', 'Énorme', 'Zimbabwe', 'Éthiopie', 'Mongolie']
I want to sort it alphabetically, so I use array.sort(), and the result I get is :
['Enflure', 'Mongolie', 'Zimbabwe', 'Énorme', 'Éthiopie']
I guess the accents are the problems here, so I would like to replace the É with an E all over my array.
I tried this
for (var i = 0; i < (array.length); i++) {
array[i].replace(/É/g, "E");
}
But it didn't work. How could I do this?