Skip to content

Instantly share code, notes, and snippets.

View endor's full-sized avatar

Frank Prößdorf endor

  • Elo Health
  • Tampere, Finland
View GitHub Profile
@endor
endor / screening.js
Created September 13, 2010 22:36 — forked from rmurphey/screening.js
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
// not sure I would though.. sometimes the above is more readable than the below
(foo) ? bar.doSomething(el) : bar.doSomethingElse(el);