Does anyone know how to write an immediate function using ES6 arrow syntax?
Here's the ES3/5 way of doing it:
(function () {
//...
}());
I've tried the following but get an unexpected token
error on the last line.
(() => {
//...
}());
You can test this here: http://www.es6fiddle.net/hsb8bgu4/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…