2

I read this How to run ES6 code with arrow functions in Safari? but this question since January 2016. I also founded one issue about this on github, but it also since 2016.

I use the arrow functions, and my main script looks like that (()=>{ ... })(). So, it works nicely in all browsers except Safari 9. The last one gives me an error SyntaxError: Unexpected token ')'.

Following the attached link, I found that "Safari doesn't yet support this feature". In the MDN site I didn't found anywhere that Safari doesn't support this stuff. I was here too http://kangax.github.io/compat-table/es6/. I don't very well understand the table there, but I see the Safari and it is green.

So, I don't undersand, Safari support arrow functions or still not? Or my error have some other reason?

Robbie KN
  • 317
  • 1
  • 8
  • 3
    No. They are not supported on Safari 9. https://caniuse.com/#search=arrow%20functions and Safari 9 never will. That's what new versions are for - to support more features. Software vendors do not go back to older versions and change their feature support. Doing that means it's no longer the same version. – Scott Marcus Sep 04 '18 at 19:01
  • @Scott Marcus I see! Quick response thanks! Why not post it as an answer, I'll check it, if you want. – Robbie KN Sep 04 '18 at 19:08
  • 1
    Honestly, because your question really isn't appropriate for Stack Overflow in the first place. The very first link you shared to MDN gives you the answer you need if you scroll down to the bottom of that page. It tells you that support wasn't added until version 10. – Scott Marcus Sep 04 '18 at 19:11
  • Why only -1 just make it -10... Actually I am good with that – Robbie KN Sep 04 '18 at 19:11
  • Ok, I'll take it :) – Robbie KN Sep 04 '18 at 19:12
  • 1
    It wasn't me who down voted you, but as I said. Your question really isn't appropriate in the first place. We expect you to do research before posting and both of the links you said you looked at clearly give you the answer. – Scott Marcus Sep 04 '18 at 19:12
  • 2
    @Scott Marcus are you a DEV, if it is, you know that somedays our head is clogged so badly that we do not see the obvious. Maybe I debug too much, maybe I need some rest because I know what is MDN, and where to find the compatibility. And I was there, and I swear you that a didn't see this Safari 10. – Robbie KN Sep 04 '18 at 19:35
  • 2
    @Scott Marcus But I appreciate you, first because of your answer, and secondly, that showed me what people are here, in stackoverflow, such understanding. Next time, even with a clogged head, I will hold from the question. Thanks to people such as you, disappears all desire to use such resources. But thanks, and thanks again. – Robbie KN Sep 04 '18 at 19:35
  • 2
    @Scott Marcus oh I see your question here, **it's so down** [link](https://stackoverflow.com/questions/40475931/npm-install-creates-267-sub-folders-with-the-official-angular2-quickstart-tutori). So, it just happens here, well, I understand **someone voted for you down, for someone you voted down, the classic "stackoverflow".** – Robbie KN Sep 04 '18 at 19:52
  • Don't take down votes personally. They are simply part of the system we have here to encourage good questions and answers and to discourage poor questions and answers. Sure, sometimes people vote carelessly, but that's not the norm. – Scott Marcus Sep 04 '18 at 19:55

1 Answers1

1

If you didn't found the answer there, try https://caniuse.com/#search=arrow%20functions. I'm sure it's what you need!

J.Kobra
  • 67
  • 6
  • 1
    Welcome to Stack Overflow. While the OP has marked your answer as correct, it really should never have been posted. First, because it's not an answer, it's just a comment (based on a comment I already made) and second because this is not the kind of question that should have been posted here in the first place. We don't like to "reward" poor questions with answers because it just attracts more poor questions. – Scott Marcus Sep 04 '18 at 22:02