Joel Thoms
1 min readJan 29, 2017

--

You could convert something like this:

function doSomething(variable) {
if (!variable) { return null; }
console.log(variable)
}

To this:

const doSomething = variable =>
variable ? console.log(variable)
: null

--

--

Joel Thoms

Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!