default values with constructor fix

to allow example to be run without returning already defined error
pull/60/head
Patrick Njuguna 6 years ago committed by GitHub
parent c8eab858a8
commit e9b7ce001b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -204,9 +204,10 @@ class Person {
}
const person1 = new Person() // it will take the default values
const person1 = new Person('Lidiya', 'Tekle', 28, 'Finland', 'Espoo')
const person2 = new Person('Lidiya', 'Tekle', 28, 'Finland', 'Espoo')
console.log(person1)
console.log(person2)
```
```sh

Loading…
Cancel
Save