Skip to content

Instantly share code, notes, and snippets.

@ethyde
Created September 30, 2014 11:40
Show Gist options
  • Save ethyde/0ed5e4a068d6572a287f to your computer and use it in GitHub Desktop.
Save ethyde/0ed5e4a068d6572a287f to your computer and use it in GitHub Desktop.
Return multiple value http://stackoverflow.com/a/2917186
// set
var newCodes = function(){
var dCodes = fg.codecsCodes.rs; // Linked ICDs
var dCodes2 = fg.codecsCodes2.rs; //Linked CPTs
return [dCodes, dCodes2];
};
// get
var codes = newCodes();
var dCodes = codes[0];
var dCodes2 = codes[1];
// width label
// set
var newCodes = function(){
var dCodes = fg.codecsCodes.rs; // Linked ICDs
var dCodes2 = fg.codecsCodes2.rs; //Linked CPTs
return {
dCodes: dCodes,
dCodes2: dCodes2
};
};
// get
var codes = newCodes();
var dCodes = codes.dCodes;
var dCodes2 = codes.dCodes2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment