2017-03-16 60 views

回答

1

I get this error: SyntaxError: Unexpected token '>' at this line:

這是因爲Safari的9.x不支持ES6(ES2015)的arrow functions功能,你在這個聲明中使用:

(devices,value) => devices.some(d => value.includes(d)) 

順便說一句,它也有一個專門const特徵的基本支持。你可以檢查整個圖片here

How can I make the site not crash at this line, on older iOS devices?

使用transpiler(babel要不然)改造寫入ES6到ES5風味的代碼。

+0

謝謝!我有我的想法,它可能來自ES6,但作爲JavaScript的初學者,我不確定 –

相關問題