i have list of TodoItem ```data class TodoItem( ...
# getting-started
m
i have list of TodoItem
Copy code
data class TodoItem(
    val taskName :String,
    val isCompleted : Boolean  = false,
)

 private val taskList = mutableListOf<TodoItem>()
how can i change an element 'isCompleted' to true. so if user said 4th element is completed how can i change it to complete
Copy code
taskList[index] = TodoItem(taskName = taskList[index].taskName, isCompleted = true)
like this???
e
Copy code
taskList[index] = taskList[index].copy(isCompleted = true)
m
thankyou 😄