Skip to content

Instantly share code, notes, and snippets.

@DDzia
Created April 19, 2019 09:14
Show Gist options
  • Save DDzia/b739994687d7ae71c7180a8e32c595af to your computer and use it in GitHub Desktop.
Save DDzia/b739994687d7ae71c7180a8e32c595af to your computer and use it in GitHub Desktop.
/*
No step. Only for example.
This is function will be created at run-time in memory really.
*/
function selfInvokable(enumType) {
// step 3: enumType["Alex"] = 0;
// step 4: enumType[enumType["Alex"]] = "Alex";
// step 5: enumType["Alex"] = 1;
// step 6: enumType[enumType["Denis"]] = "Denis";
}<br />
// step 0: var Names = undefined;
// step 1: if(!Names) { Names = {}; }
// step 2: selfInvokable(Names);<br />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment