sort() method, as its name suggests, sorts every element in an array.
By default, the elements are converted into strings and sorted in ascending order based on UTF-16 code unit values.
If the array contains various types of characters such as signs, numbers, and letters with different cases, the order would be like this; signs* > numbers > upper case letters > lower case letters.
When I started to learn to code, I just had been focusing to write code without causing errors.
However, when you search and read any documents or ask someone to solve the errors, knowing the syntax and being able to speak with those names would make your coding life easier.
I remember how it looks like and how to code, but somehow I tend to forget the name of each part of the syntax.
For those who (if there are someone like me out there), here is the note that might well come back and check now and then.
Japanese women who code at home.