When lsEstimator
is an array with 2 elements, this function returns true
:
function got_estimators() {
var retval =
(typeof lsEstimator != 'undefined' &&
lsEstimator != null &&
lsEstimator.length > 0);
return retval;
}
but this function doesn't (it returns undefined
, I think, in Chrome and FF):
function got_estimators() {
return
(typeof lsEstimator != 'undefined' &&
lsEstimator != null &&
lsEstimator.length > 0);
}
Why?