Comment

Comment by ptgloden

In ES6, you can write more terse immediately invoked function expressions. So you could use

  var a = (prop => prop > 5 ? prop : whatever)(objImUsing.prop.someLongName)
rather than

  var a = (function (prop) { return prop > 5 ? prop : whatever })(objImUsing.prop.someLongName)
parent ptgloden 13 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton