This file contains hidden or 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
// Receiver: Lamp | |
class Lamp { | |
turnOn() { | |
console.log("Lamp is ON"); | |
} | |
turnOff() { | |
console.log("Lamp is OFF"); | |
} | |
} |
This file contains hidden or 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
// Receivers: Devices | |
class Light { | |
turnOn() { | |
console.log("Lights are ON"); | |
} | |
turnOff() { | |
console.log("Lights are OFF"); | |
} | |
} |
This file contains hidden or 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
// Receiver: Lamp | |
class Lamp { | |
turnOn() { | |
console.log("Lamp is ON"); | |
} | |
turnOff() { | |
console.log("Lamp is OFF"); | |
} | |
} |