Today I Learned

hashrocket A Hashrocket project

V8 Optimizations

V8 will not define variables that would normally be within JS function scope until they're actually called.

test('visiting /foo/bar', function(assert){
  var foo = server.create('foo');
  var bar = server.create('bar');

  andThen(function(){
      var someProp = foo.callProperty;
      debugger
  });
});

When the console opens, foo will be in scope, while bar will be undefined

See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.