'the boogeyman ' + false ? 'is scary' : 'is not scary' evaluate to?
'the boogeyman ' + falsewhich yields
'the boogeyman false' ? 'is scary' : 'is not scary'which yields
Resolving the bug and getting the answer we want is accomplished by using parenthesis to force the ternary to be executed before the addition,
'the boogeyman ' + (false ? 'is scary' : 'is not scary').
For experienced developers the above may have been self-evident. Operator precedence is worth keeping in mind though because of its importance and the subtly of the bugs caused by it.