Functions in Classes
In this lesson, we will cover the concept of functions in classes.
We'll cover the following...
Functions and class
in a nutshell
Functions written inside a class are a little bit different. In the next chapter, we will talk about the object and all the rich possibilities that TypeScript brings. In short, functions are similar but don’t use the keyword function
. Instead, the explicit visibility of the function is used or sometimes, not at all.
The following code defines three functions. Line 2 is a private function. A private function can ...