loading...

re: A simple tip for cleaner code VIEW POST

FULL DISCUSSION
 

var dict = {'1':'YES',
'0':'MAYBE',
'-1':'NO'};

function foo($bar) {
    return dict[Math.sign($bar)];
}
code of conduct - report abuse