Get A Substring From A String

Basic Usage

This is how to get part of a string

01const full_string_1 = "the quick brown fox"
02const substring_from_start = full_string_1.substring(0, 9)
..
  

console.log(substring_from_start)
->

Grab The Rest Of A String

Passing only one number will create a substring starting at that index and grab the rest of the string from that point

01const full_string_2 = "the quick brown fox"
02const substring_to_end = full_string_2.substring(10)
..
  

console.log(substring_to_end)
->