How js modifies a value of an item in an array through a trigger operation

let arr= [{text:"sdfa",completed:true,id:-1}, {text:"ssssss",completed:false,id:-2}];
arr.map ((todo) = >

<li onClick={//licompleted}>{todo.text}</li>

)

how do you write the onClick function here?

May.31,2022

  

at that time too much trouble to change the value of an item, in fact, directly return to the modified array

Menu