create a public class named monday. this class shall contain the main method
class Monday {
constructor(day) {
this.day = day;
}
getDetails() {
return (`The day name ${this.day}.`)
}
}
let days = new Monday("Monday");
console.log(days.getDetails());
Comments
Leave a comment