I\'m a bit confused about how to best refactor my code into something more readable.
Consider this piece of code:
var foo = getfoo(); if(foo!=null) {
var foo = getFoo(); var bar = (foo == null) ? null : getBar(foo); var moo = (bar == null) ? null : getMoo(bar); var cow = (moo == null) ? null : getCow(moo); if (cow != null) { ... }