Last active
March 24, 2022 19:41
-
-
Save jpwco/5996a08b6bd534661687ca1b100502ba to your computer and use it in GitHub Desktop.
Refactoring example #1 before
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Department { | |
name; | |
printName() { | |
console.log("Department name: " + this.name); | |
} | |
} | |
class AccountingDepartment extends Department { | |
printMeeting() { | |
console.log("The Accounting Department meets each Monday at 10am."); | |
} | |
generateReports() { | |
console.log("Generating accounting reports..."); | |
} | |
} | |
// src: https://www.jetbrains.com/help/webstorm/specific-javascript-refactorings.html#javascript_pull_member_up_refactoring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment