I want to make a string in alphabet order using javascript.
example, if string is "bobby bca" then it must be "abbbbcoy" but I want it in a function - take not that I dont want spaces to be there just alphabet order.
I'm new to javascript here is what I have already:
function make Alphabet(str) {
var arr = str.split(''),
alpha = arr.sort();
return alpha.join('');
}
console.log(Alphabet("dryhczwa test hello"));
function make Alphabet)? And also, you want to remove all spaces?make Alphabet()must bemakeAlphabet()