0

Following code is available on 5-minute TypeScript tutorial, where last example would convert .ts file to .js file and then previewed on browser window. I am new with JavaScript and TypeScript, so I failed to Google relevant information about some of the converted code below.

var Student = /** @class */ (function () {
    //            1         2       3
    function Student(firstName, middleInitial, lastName) {
        this.firstName = firstName;
        this.middleInitial = middleInitial;
        this.lastName = lastName;
        this.fullName = firstName + " " + middleInitial + " " + lastName;
    }
    return Student;
}());
//4

First is JSDoc comment, available here. Third is Anonymous Function Expression, available here.

But I can't quite understand what is purpose of Two and Four. Deleting either curly braces would not give relevant result.

Thank you and have a nice day.

Hadi
  • 19
  • 3

0 Answers0