JavaScript substring method with numbers

let str = "This is a string";

// Return everything between indexes 5 and 10
console.log(str.substring(5, 10));
/* This will return everything between
 * 6th and 11th character in the string
 */
 
 // Result:
 // is a 
 
 // Return everything from index 3 to the end
 console.log(str.substring(3));
 /**
  * This will return everything from the 4th
  * charater to the end
  * */
  
  // Result:
  // s is a string