title: Convert date inside map function of render in ReactJs
body: <p>The following code is inside return of render function </p>
  
  <pre><code>this.props.investment.selectedInvestor.rounds.map((item,index)=&gt;{
     if(item.type.toLowerCase()==this.state.securityType.toLowerCase())
     {
        return(
          &lt;tr onClick={()=&gt;this.showRoundDetails(true,item)}&gt;
          &lt;td&gt;
            &lt;strong&gt;{item.round_name}&lt;/strong&gt;&lt;br/&gt;
            &lt;span&gt;{item.close_date}&lt;/span&gt;
            &lt;/td&gt;
          &lt;td&gt;{item.security_type}&lt;/td&gt;
          &lt;td&gt;{item.sharing_plan}&lt;/td&gt;
          &lt;td&gt;{item.investments[0].status}&lt;/td&gt;
          &lt;td&gt;{item.rate}&lt;/td&gt;
          &lt;td&gt;{item.frequency}&lt;/td&gt;
          &lt;td&gt;{item.investments[0].current_amount}&lt;/td&gt;
          &lt;/tr&gt;
          )  
      }                             
    }
  </code></pre>
  
  <p>I want to convert <code>{item.close_date}</code> to another format i.e use this function <code>toLocaleDateString()</code><br>
  I tried declaring another variable outside return and then convert the date but still could not solve it </p>