-1

With es6 we could (() => {})() Is there any way to write self-executing block in a way like we can do it in jsx? I mean, just { ["a"][0] }, witch should return "a".

What's I found so far http://wiki.ecmascript.org/doku.php?id=proposals:block_expressions&s=let

fckt
  • 571
  • 4
  • 12
  • 1
    Well, for single expressions you can simply omit the block. For anything larger, the IIAF should be fine. Do you have a real-world problem that you could post as an example - maybe theres a better solution? – Bergi May 21 '15 at 16:22
  • yes, you definitely right. I don't think that such thing have any significant practical application ). I understood now why Arrow-functions called so ). Thank you for your explanation! ) – fckt May 21 '15 at 16:56

1 Answers1

0

Now I realized that such syntax actually have no significant practical application.

Thank @Bergi for the comment!

Well, for single expressions you can simply omit the block. For anything larger, the IIAF should be fine. Do you have a real-world problem that you could post as an example - maybe theres a better solution? –

fckt
  • 571
  • 4
  • 12