Last active
March 27, 2022 06:58
-
-
Save GalindoSVQ/fcd1c3d07c2b8afa4779c08a95dc32fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const response = [] | |
| const userObj = { | |
| id: "fd70a8cd-32b5-437a-98b6-2363bda276f1", | |
| name: "Antonio", | |
| lastName: "Galindo", | |
| cardId: 123456789 | |
| }; | |
| userObj[Symbol.iterator] = function* () { | |
| const values = Object.values(userObj); | |
| for (const value of values) { | |
| yield value; | |
| } | |
| }; | |
| for (const prop of userObj) { | |
| response.push(prop) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment