Answers for "get character from string js"

12

javascript get first character of string

var str="Hello Folks!"
var firstStringChar = str.charAt(0); //H
Posted by: Guest on August-01-2019
2

javascript get character from string

// (ES6 / ES2015)+ way of doing it
const str = "Hello World!";
const chars = [...str];

// Pre-ES2015 way of doing it
var chars2 = str.split("");
Posted by: Guest on February-27-2021
0

javascript get character from string

const str = "Hello World";
const firstCharacter = str.charAt(0);
Posted by: Guest on March-02-2021
0

javascript string return character

var str = "HELLO WORLD";
var res = str.charAt(0);
Posted by: Guest on November-11-2019

Code answers related to "get character from string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language