Closed balinterdi closed 4 years ago
The below code will not default the rating property of Song to 0 if no rating is passed in:
rating
export default class Song { title = ''; rating = 0; band = null; constructor({ title, rating, band }) { this.title = title; this.rating = rating; this.band = band; } }
It probably makes no sense to have class fields at all for Band and Song.
The below code will not default the
rating
property of Song to 0 if no rating is passed in:It probably makes no sense to have class fields at all for Band and Song.