Assign to array

Hello Guys

I know this is a weird question, but I just wanna make sure
is this peace of code assigning property to an array ??

bugAssignedToUser: (state, action) => {
  const { bugId, userId } = action.payload;
  const index = state.findIndex((bug) => bug.id === bugId);
  state[index].userId = userId; <<<<<< this line 
},

Hi, this should work - state is passed by reference, therefore when you access and modify one of its elements, you are modifying the original array.

Thank you got it , your answer help me