return char in string javascript code example
Example 1: find char in string javascript
var str = "Hello world, welcome to the universe.";
var n = str.indexOf("e");
Example 2: javascript get character from string
const str = "Hello World";
const firstCharacter = str.charAt(0);