Which is the better way for conditional variable assignment?
1st method
if (true) { var myVariable = \'True\'; } else { var myVariable = \'False\
You could do a ternary, which is a lot shorter (and no darn curly braces):
var myVariable = (true) ? 'True' : 'False';