3 ms·
The code samples fail in Safari. The first one prints "SyntaxError: Unexpected token '>'".
by millstone 10y ago
The code samples fail in Safari. The first one prints "SyntaxError: Unexpected token '>'".
- dsego 10y agoYou need Safari Technology Preview for ES6 support.
- Sacho 10y agoYour version of Safari most likely lacks support for ES6 features like arrow functions[0], you could use babel[1] to transpile the code to ES5: (function (f) { return f(f); })(function (func) { return function (n) { return n === 0 ? 1 : n * func(func)(n - 1); }; })(19); [0] http://caniuse.com/#feat=arrow-functions http://caniuse.com/#feat=arrow-functions [1] https://babeljs.io/repl/ https://babeljs.io/repl/