Created
November 23, 2018 00:23
-
-
Save ORESoftware/5a1626037cb8ba568cdffa69374eac1d to your computer and use it in GitHub Desktop.
Get string representation of func
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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