Jak zrobić alfabet w JavaScript
// To get an array of letters from 'a' to 'z' in javascript.
let alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');
Caffeinated Developer
// To get an array of letters from 'a' to 'z' in javascript.
let alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');
sort String
const alphabetize = () => {
const newText = text
.split(" ")
.sort(function(a, b) {
return a.localeCompare(b);
})
.join(" ")
.toString();
return newText
};