how to turn mapped data into upper case react

Solutions on MaxInterview for how to turn mapped data into upper case react by the best coders in the world

showing results for - "how to turn mapped data into upper case react"
Ela
17 May 2020
1 {
2  filteredData.map((value) => {
3    let { id, email, first_name, last_name } = value;
4
5    //Capitalizing first char of first and last name
6    const firstName =
7      first_name.charAt(0).toUpperCase() + first_name.substring(1);
8    const lastName = last_name.charAt(0).toUpperCase() + last_name.substring(1);
9
10    return (
11      <>
12        <div>{email}</div>
13        <div>{firstName}</div>
14        <div>{lastName}</div>
15      </>
16    );
17  })
18}
19