Level 1M5Lesson 5.1

beginner40 minby DevFox

Declaring functions: parameter and return types

Write a few lines once and run them whenever you like: declare a function with a name, typed parameters and a return type, call it with arguments, and use the value that return hands back. Follow a call into the body and out again, see why a parameter’s type must always be written, and how TypeScript checks every call, the body and the return against the first line. TaskKit gets its first function, capitalize.

  • Fundamentals
  • TypeScript
Declaring functions: parameter and return types. Read this lesson at .