javascript - Why does appear in this stack trace? -



javascript - Why does <anonymous> appear in this stack trace? -

why <anonymous> appear in stack trace? every object , function in script has name, anonymous it?

the script:

function weallhavenames(cb) { cb(); } weallhavenames(function ihaveaname(){ var x = y.a; });

the stack trace:

weallhavenames(function ihaveaname(){ var x = y.a; }); ^ referenceerror: y not defined @ ihaveaname (/users/trindaz/code/scratchpad/funcs.js:5:47) @ weallhavenames (/users/trindaz/code/scratchpad/funcs.js:2:3) @ object.<anonymous> (/users/trindaz/code/scratchpad/funcs.js:5:1) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10) @ startup (node.js:119:16) @ node.js:906:3

javascript

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -