Question: Which function is used to update state variables in a React class component?

  1. `replaceState`
  2. `refreshState`
  3. `updateState`
  4. `setState`

Answer: The correct answer of the above question is Option D:`setState`