-
-
Save RexSkz/945fe97e316f427d85e75ba56f8ddf8c to your computer and use it in GitHub Desktop.
Roses are read, violets are blue. Unexpected token { at line 32.
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
// inspired by https://twitter.com/nixcraft/status/1162020669242003456 | |
console.log('Roses are red, violets are blue.'); | |
try { | |
eval('function {'); | |
} catch(e) { | |
let [_, lineno] = e.stack.match(/:(\d+):(\d+)/); | |
console.error(`${e.message} at line ${lineno}.`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment