$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #89

What goes in the blank?

// returns the first character of the string s
function firstChar(s: string): string {
  return s[____];
}

Answer: 0 (also accepted: 0)

Index 0 is the first character of a string.
Play Problem Solving ▸