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
// cand ai un singur caz | |
if (today == "Monday") { | |
eat_pizza(); | |
} | |
// cand ai 2 cazuri opuse | |
if (day_time == "day") { | |
stay_awake(); | |
} else { | |
sleep(); |
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 Greeting extends React.Component { | |
componentDidMount() { | |
window.MyApp.events.onEscape = this.closePopup; | |
} | |
componentWillUnmount() { | |
window.MyApp.events.onEscape = null; | |
} | |
closePopup () { … } | |
render() { … } | |
} |