Created
August 29, 2016 21:12
-
-
Save asm-jaime/e3f7dfe3ed5663b4705f1af49c145ff9 to your computer and use it in GitHub Desktop.
enumeration object (JavaScript)
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 abstract_object = { | |
first_pro : "first", | |
second_pro : "second", | |
third_pro : "third" | |
}; | |
Object.keys(abstract_object).map((num, index) => { | |
abstract_object[num] = index+1; | |
}); | |
console.log(abstract_object); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment