Skip to content

Instantly share code, notes, and snippets.

@connormckelvey
Forked from whichsteveyp/es5.js
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save connormckelvey/af2d5a59930ecc76268e to your computer and use it in GitHub Desktop.
Save connormckelvey/af2d5a59930ecc76268e to your computer and use it in GitHub Desktop.
// one
[].each(function (foo) {
return foo.info ? "hello" : "hi";
});
// two
[].each(function (foo) {
return foo.info ? "hello" : "hi";
});
// three
[].each(function (foo) {
foo.info ? "hello" : "hi";
});
// one
[].each(foo => foo.info ? 'hello' : 'hi');
// two
[].each((foo) => { return foo.info ? 'hello' : 'hi'; });
// three
[].each((foo) => { foo.info ? 'hello' : 'hi'; });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment