title: Uncaught ReferenceError: localePreference is not defined
body: <p>I'm using Javascript's <code>Date()</code> method to convert ISO to readable formats.</p>
  
  <pre><code>formatIsoDate({date}) {
      const options = { year: 'numeric', month: 'long', day: 'numeric' }
      return new Date(dateString).toLocaleDateString(options)
  }
  
  render() {
      return (
          &lt;p&gt;{formatIsoDate({date: this.props.date})}&lt;/p&gt;   
      )
  }
  </code></pre>
  
  <p>but I'm getting an error: </p>
  
  <blockquote>
    <p>Uncaught ReferenceError: localePreference is not defined</p>
  </blockquote>
  
  <p>I'm reading up the docs on Mozilla MDN but I don't see anything there. It says the first parameter of the <code>toLocaleDateString</code> <em>locale</em> is optional.</p>