Created
November 7, 2016 20:50
-
-
Save diegodelfin7/8118c808311c858f8c261801c410c8da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Student { | |
fullName : string; | |
constructor(public firstName, public middleInitial, public lastName) { | |
this.fullName = firstName + " " + middleInitial + " " + lastName; | |
} | |
} | |
interface Person { | |
firstName : string; | |
lastName : string; | |
} | |
function greeter(person : Person) { | |
return "Hello ," + person.firstName + " " +person.lastName; | |
} | |
var user = new Student("Jane", "M . ", "User"); | |
document.body.innerHTML = greeter(user); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment