Skip to content

Instantly share code, notes, and snippets.

@asm-jaime
Created August 29, 2016 21:12
Show Gist options
  • Save asm-jaime/e3f7dfe3ed5663b4705f1af49c145ff9 to your computer and use it in GitHub Desktop.
Save asm-jaime/e3f7dfe3ed5663b4705f1af49c145ff9 to your computer and use it in GitHub Desktop.
enumeration object (JavaScript)
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