Skip to content

Instantly share code, notes, and snippets.

@carbide-public
Last active May 21, 2018 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carbide-public/8943be92c3a1020c98f5a299f6a295b9 to your computer and use it in GitHub Desktop.
Save carbide-public/8943be92c3a1020c98f5a299f6a295b9 to your computer and use it in GitHub Desktop.
untitled
let flats = ['des','ees','fes','ges','aes','bes','ces'];
let sharps = ['cis','dis','eis','fis','gis','ais','bis'];
var pairz = flats.map(function(note,index) {return [note, sharps[index]]; });
let objectify = a => a.reduce( (o,[k,v]) => (o[k]=v,o), {} );
let pariObject = objectify(pairz);
pariObject.des;
pairz[3];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment