title: Convert string array into object with same key/value
body: <p>How do I convert <code>["one","two","three"]</code> into <code>{one:"one", two:"two", three:"three"}</code></p>
  
  <pre><code>import stringArray from './a.js';
  
  class b {
   hashmap = stringArray// convert this into Object here inline.
  }
  </code></pre>
  
  <p>Before you jump I know of for how to achieve this in say constructor() with tricks like forEach, for in loop etc. Is there a simple one line code to achieve this in the class property not inside a function.</p>