Can someone assist me with sorting the element cinema
in array arr
by symbol unicode (the output should be "aceinm")? I am aware that I need to use the sort()
method in this case. However, I am unsure of how to apply the sort method to an array element.
Any help would be greatly appreciated. The code below does not seem to be working properly.
Error: arr[1].sort is not a function.
var arr = ["cinema"];
arr[1].sort();
console.log(arr[1]);