Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get nth character of string javascript

const place = "Denmark";

const n = 0; // 0 indexed i.e. 1st character
const firstCharacter = place.charAt(n);

console.log(firstCharacter); // D
Source by reactgo.com #
 
PREVIOUS NEXT
Tagged: #nth #character #string #javascript
ADD COMMENT
Topic
Name
4+8 =