Simplifying iterate defineProperty