score:3

Accepted answer
if (typeof container === 'function') {
   container = container();
} else {
   container = container;
}

score:0

condition ? expr1 : expr2  

score:3

if(typeof container === 'function')container= container();
else container = container;

Related Query

More Query from same tag