Which is the better way for conditional variable assignment?
1st method
if (true) { var myVariable = \'True\'; } else { var myVariable = \'False\
let value = function(condition){ if(condition) { return "true"; } else { return "false"; } } console.log(value(true));