$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · easy · #203

What is the output?

const word: string = 'stack';
console.log(word.slice(1, 3));
  1. ta
  2. tac
  3. st
  4. sta
slice keeps the start index and stops before the end index: characters 1 and 2.
Play Problem Solving ▸