javascript string return character

JavaScript
\r\nvar str = "HELLO WORLD";
var res = str.charAt(0);
Source

Also in JavaScript: