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

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -