Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
export class Student {
private _name: string;
private _age: number;
constructor(name: string, age: number) {
this._name = name;
this._age = age;
public toString() {
return `${this._name}: ${this._age} years old`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment