Skip to content

Commit

Permalink
default values with constructor fix
Browse files Browse the repository at this point in the history
to allow example to be run without returning already defined error
  • Loading branch information
npnjuguna authored Jan 18, 2020
1 parent c8eab85 commit e9b7ce0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 15_Day/15_day_classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e9b7ce0

Please sign in to comment.