TNO
06-14-2008, 12:08 AM
This is more of a mental exercise than anything practical. Why does the following throw an exception? Should it really throw an exception?
var a,b,c;
a = (b == c)?
(new function(){
return "Path 1";
})():(new function(){
return "Path 2";
})();
alert(a);
var a,b,c;
a = (b == c)?
(new function(){
return "Path 1";
})():(new function(){
return "Path 2";
})();
alert(a);