title: How to access Enum in typescript ? giving error "Element implicitly has an any type because index expression is not of type number"
body: <pre><code>export enum r {
    color1 = &quot;Red&quot;
    color2 = &quot;green&quot;
    color3 = &quot;blue&quot;
  }
  
  ar = [&quot;color1&quot;, &quot;color2&quot;];
  ar.map(e =&gt; {
    if (r[e as any] !== undefined) {
      return r[e]
    }
  })
  </code></pre>
  <p>Above statement giving &quot;Element implicitly has an any type because index expression is not of type number&quot;</p>