avoid no param reassign when setting a property

Solutions on MaxInterview for avoid no param reassign when setting a property by the best coders in the world