Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function printstudent() {
var s1 = new Student("foo", 7);
printstudent(); // Student is not defined error
class Student {
constructor(name, age) { = name;
this.age = age;
printstudent(); // print foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment