object vs closure

Consider this JavaScript function: 1 2 3 4 5 function fn() { var a = 10; var b = { name: ‘foo’, n: 10 }; } This might produce the following: I say “might” because specific behaviors depend heavily on implementation. This post takes a V8-centric approach with many diagram shapes linking to relevant source…