Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Forked from jashkenas/returns.js
Created July 19, 2010 23:48
Show Gist options
  • Save tim-smart/482228 to your computer and use it in GitHub Desktop.
Save tim-smart/482228 to your computer and use it in GitHub Desktop.
var withReturn = function() {
return 'x';
};
var withoutReturn = function() {
'x';
};
JSLitmus.test('without a return', function() {
for (var i=0; i<1000; i++) {
withoutReturn();
}
});
JSLitmus.test('with a return null', function() {
for (var i=0; i<1000; i++) {
withReturn();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment