$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · medium · #152

Which fix removes the bug?

function shout(text: any): string {
  return text.toUpperCase();
}
  1. Type the parameter string
  2. Return text without a call
  3. Mark the function async
  4. Rename the parameter str
any disables checking, so a number argument crashes only at runtime.
Play Problem Solving ▸