How to get first character of string?

charAt can give wrong results for Unicode. Use Array.from:

Array.from('some string')[0];

Leave a Comment