3 ms·
Excuse me, but that's what you call elegant? From a readability standpoint I'll take the "old" version any day: function getFromDB(foo) { var result
by moe 15y ago
Excuse me, but that's what you call elegant?
From a readability standpoint I'll take the "old" version any day:
function getFromDB(foo) {
var result = asynchronousCache.get("id:3244");
if ( null == result ) {
result = asynchronousDB.query("SELECT * from something WHERE id = 3244");
}
return result;
}