From 78d3913de69ef16003d370ac40c78b1f48d3a71d Mon Sep 17 00:00:00 2001 From: LSvekis Date: Tue, 22 Jun 2021 15:42:36 -0400 Subject: [PATCH] Create ex-1 --- chapter7/ex-1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 chapter7/ex-1 diff --git a/chapter7/ex-1 b/chapter7/ex-1 new file mode 100644 index 0000000..36c19da --- /dev/null +++ b/chapter7/ex-1 @@ -0,0 +1,10 @@ +class Person { + constructor(firstname, lastname) { + this.firstname = firstname; + this.lastname = lastname; + } +} +let person1 = new Person("Maaike", "van Putten"); +let person2 = new Person("Laurence", "Svekis"); +console.log("hello "+person1.firstname); +console.log("hello "+person2.firstname);