Skip to content

Instantly share code, notes, and snippets.

@ORESoftware
Created November 23, 2018 00:23
Show Gist options
  • Save ORESoftware/5a1626037cb8ba568cdffa69374eac1d to your computer and use it in GitHub Desktop.
Save ORESoftware/5a1626037cb8ba568cdffa69374eac1d to your computer and use it in GitHub Desktop.
Get string representation of func
'use strict';
const foo = {
bar: {
star: {
guitar: 'geetar'
}
}
};
const stew = {
moo: () => foo.bar.tar.guitar
};
let guitar;
try {
guitar = stew.moo();
console.log(guitar);
}
catch (err) {
console.error('Could not get value from:', stew.moo.toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment