title: JavaScript do expression: if statement without else
body: <p>I have a question about the proposed <a href="https://babeljs.io/docs/plugins/transform-do-expressions" rel="noreferrer">JavaScript do expression construct</a>. There are many examples that show how it can be used to return a value from a conditional statement that has both <code>if</code> and <code>else</code>. Also valid for <code>if</code> with <code>else if</code> and <code>else</code>.</p>
  
  <p>What about a conditional that has just an <code>if</code> clause but no <code>else if</code> or <code>else</code>? Is this valid usage of the <code>do</code> expression?</p>
  
  <p>My use case is for conditionally displaying content in a <strong>React</strong> component. I would like to write JSX code like so, but I am not sure if it is valid:</p>
  
  <pre><code>export default function myComponent(props) {
    return (
      &lt;div&gt;
        {do {
          if (true) {
            &lt;p&gt;If statement is true&lt;/p&gt;
          }
        }}
        &lt;p&gt;I am always rendered&lt;/p&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  
  <p>I also asked the question in <a href="https://gist.github.com/dherman/1c97dfb25179fa34a41b5fff040f9879" rel="noreferrer">this gist</a>.</p>