Skip to content

Latest commit

 

History

History
executable file
·
13 lines (10 loc) · 645 Bytes

File metadata and controls

executable file
·
13 lines (10 loc) · 645 Bytes

Below are some basic methods that can be used with strings. The .length property as well as the indexer and the charAt() methods are all string properties/methods that you will be using in the future. The syntax of the following properties and methods are shown below.

string.length

  • returns the number of characters in the string

Indexer (string[index])

  • gets a single-character string at location the index
  • index starts from 0
  • if index is outside the range of string characters, the indexer returns undefined

charAt(index)

  • gets a single-character string at location index
  • works similarly to the indexer