Class Access Modifier in Typescript

Class Access Modifier
TypeScript access modifier are keywords that control the visibility of class members such as properties and methods They control who access to these members properties or methods and where they can get it.
                  
                    class Car {
                      public name: string = '';
                      protected price: number = 0;
                      private model: string = '';

                      constructor(name: string, price: number, model: string) {
                        this.name = name;
                        this.price = price;
                        this.model = model;
                      }

                      public display(): string {
                        return `${this.name} ${this.price}, ${this.model}`;
                      }
                    }

                    const carObj = new Car('BMW', 15000000, 'X7');
                    console.log(carObj.display());