title: JavaScript's inline If/Else with string concatenation returns unexpected value
body: <p>I am using this JavaScript code to add an item into an array of objects containing search criteria.</p>
  
  <p>My goal is to use "T00:00:00" if the search criterion is the beginning of the date range, and "T23:59:59" if it is the end of the date range. </p>
  
  <pre><code>//key = "Created", 
  //value = "2016-11-23", 
  //to_from = "from"
  collectedValues.push({
                  key: key,
                  value: (value + 
                      (to_from === "to") ?
                          "T23:59:59" :   // when searching by date range,
                          "T00:00:00"),   // "from" must be 00:00 and 
                                          // "to" must be 23:59
                  isPartialMatch: false,
                  toFrom: to_from
              });
  </code></pre>
  
  <p>The resulting array of objects has the wrong value for the item's "value" property. It is supposed to be concatenated, like this: "2016-11-23T23:59:59". </p>
  
  <p>Instead, it just has the value of "23:59:59". </p>
  
  <p><a href="https://i.stack.imgur.com/zDPVe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zDPVe.png" alt="enter image description here"></a></p>
  
  <p>It looks like this has something to do with code formatting and splitting into multiple lines. </p>
  
  <p>Of course I could use the full if/else notation, but why doesn't this notation work? </p>