JavaScript passes objects by reference and we don't automatically clone them for you for performance reasons. If you want to modify the object without affecting context, you have to clone it or rebuild it.
JavaScript passes objects by reference and we don't automatically clone them for you for performance reasons. If you want to modify the object without affecting context, you have to clone it or rebuild it.