title: How to declare a variable in a ternary expression?
body: <p>I need to set <code>i</code> depending on a condition:</p>
  
  <pre><code>let i = null
  nightmode === true ? i = 1 : i = 0
  </code></pre>
  
  <p>Is it possible to declare <code>i</code> within the ternary expression, or does it have to be in outside of it (to handle scoping)?</p>