Join Dylan Israel for an in-depth discussion in this video Solution: Classes, part of TypeScript: Object-Oriented Programming.
(punchy electronic music) … - [Instructor] All right, … hopefully you were able to solve that, … but if not, don't worry! … We're going to go ahead and define a class here. … We're going to call it User. … Pretty straightforward at this point. … We have our User class. … class, keyword, User, name. … Now, at this point we are going to add a property, … and we'll call it firstName, … and you might imagine this is going to be a string. … Call it lastName, this is going to be a string as well. … And then we'll have an email property, … and this will also be a string. … Now, our get property, … we're going to call fullName, … and what this is going to be expected to return … is going to be our first name, and then our last name. … Now if you were a little bit more formal than I am, … what you might actually have done … is put last name comma first name, … which reminds me of my days back in school. (laughs) … So last but not least, we're going to write an email. … You can name this whatever you want. …
Skill Level Intermediate
TypeScript: Upgrades and Featureswith Emmanuel Henri1h 15m Advanced
TypeScript for Node.js Developerswith Emmanuel Henri1h 2m Intermediate
1. Classes in TypeScript
2. Inheritance in TypeScript
3. Access Modifiers in TypeScript
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.