In my code I'm trying to isolate out the first character of a variable, it is the UTF8 symbol: The code to outputs are as follows:
Code:
console.log(login_name);
console.log(login_name.charAt(0));
console.log(login_name.substring(0,1));
Output:
✨✨✨UTF8MB4
�
�
Obviously, I want .charAt() to print and not �. Any known oddities with utf8mb4 that I'm missing? My main problem is I don't know how to word this specific problem.
Also if I swap the rainbow for/ target the ✨, it functions as it should and prints properly.