items.map((itemsvalue, index) => {
return (
<>
<li key={index}>
<button className="deleteBtn" onClick={DeleteBtn}>
X
</button>
{itemsvalue}
</li>
</>
);
});
Here items is an array of strings. How can i access index value in the DeleteBtn function???