Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

The ".charAt()" JavaScript string method

// You use this method to retrieve the character at a specified position in a string. Using this method,
// we can retrieve the first letter in a word:

const word = "freecodecamp"

const firstLetter = word.charAt(0)
// f
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #The #JavaScript #string #method
ADD COMMENT
Topic
Name
4+4 =