AI

Search within strings using .startsWith(), .endsWith(), and .includes().

Your Task:

  • Check if filename starts with 'file' → startsWithFile
  • Check if filename ends with '.txt' → isTxtFile
  • Check if message includes the word 'error' → hasError
TypeScript Solution
Loading...

Submit your code to see test results