Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sergiu Munteanu jsergiu

🎯
Focusing
  • Software Developer @ Facebook
  • Pittsburgh, PA
View GitHub Profile
View if-else.js
// cand ai un singur caz
if (today == "Monday") {
eat_pizza();
}
// cand ai 2 cazuri opuse
if (day_time == "day") {
stay_awake();
} else {
sleep();
View handle-events-globaly-3.js
class Greeting extends React.Component {
 componentDidMount() {
  window.MyApp.events.onEscape = this.closePopup;
 }
 componentWillUnmount() {
  window.MyApp.events.onEscape = null;
 }
 closePopup () {  }
render() {  }
}
You can’t perform that action at this time.