title: How to use optional chaining in Node.js 12
body: <p>Optional chaining (<code>obj?.param1?.param2</code>) seems to be a great feature and I really wanted to see it implemented and finally get rid of nested ifs, arbitrary functions and what not for such a simple operation.</p>
  
  <p>But there's a problem, it doesn't work. I updated to Node 12 and I still get an error:</p>
  
  <pre><code>var dude = res?.param?.params[0]
  SyntaxError: Unexpected token '.'
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var dude = res.param?.params[0]
  SyntaxError: Unexpected token '.'
  </code></pre>
  
  <p>What is the problem? </p>
  
  <p>Do I need to change some language config or download a library to enable this feature? Or is it simply not out yet?</p>