export class Court { constructor(id) { this.id = id; this.name = "Court " + (id + 1); this.status = true; } toggle() { this.status = !this.status; this.print(); } print() { let status = this.status ? "active" : "inactive"; console.log(this.name + " is currently " + status); } render() { let type = this.status ? `class="button is-medium is-success"` : 'class="button is-medium is-dark"'; return ``; } } export function generateCourts() { let courts = []; const totalCourts = 12; for (let i = 0; i < totalCourts; i++) { courts.push(new Court(i)); } return courts; }