The info property
EasyClasses3 min
Write a class Person. The constructor takes a name and an age. The getter info returns a string like 'johns age is 34'.
Examples
new Person('john', 34).infoReturns 'johns age is 34'
Loading the editor...
- The info string
- info is declared with get
Hidden tests run on Submit