It clearly states that adding mutating keyword to any function in value type can enable them to modify the variable.read more