Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Last active April 25, 2018 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/1a1453388b0f2421c565873642d1daac to your computer and use it in GitHub Desktop.
Save uno-de-piera/1a1453388b0f2421c565873642d1daac to your computer and use it in GitHub Desktop.
class Subject {
id: number;
name: string;
constructor(id, name) {
this.id = id;
this.name = name;
}
}
class Student {
subjects: Subject[] = [];
constructor() {
}
addSubject() {
this.subjects.push(new Subject(1, 'nuevo subject'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment