+ 1

Why js arrow function not work in my app ?is it not support in sololearn app[solved]

When I use arrow function or other ES6 updait not working ... Is that from my app ,phone ,sololearn app or something else? My phone is sony xperia c3 and my android is lolepop How I can solve that ?

26th Dec 2020, 3:44 AM
alaa sufi
alaa sufi - avatar
16 ответов
+ 2
You need to send your error and sololearn Supports arrow functions in js, here is an example https://code.sololearn.com/WSFJA94uyJJZ/
26th Dec 2020, 3:52 AM
Julian Bents
Julian Bents - avatar
+ 1
alaa sufi please check if the below code works in your device https://code.sololearn.com/WOafo3kW8P4Y/?ref=app
26th Dec 2020, 4:14 AM
Art1mis
+ 1
Probaly yes
26th Dec 2020, 4:22 AM
Julian Bents
Julian Bents - avatar
+ 1
alaa sufi there might be some problem with your device, maybe that's why arrow function are not working in your device without babel. Kindly contact sololearn support. They may be able to help you out with it. Further, check if android system webview app is updated.
26th Dec 2020, 4:23 AM
Art1mis
0
Js arrow function work properly in sololearn playground. Please share the code or refer console for actual error message.
26th Dec 2020, 3:52 AM
Art1mis
0
Julian Bents its give me error SyntaxError
26th Dec 2020, 3:56 AM
alaa sufi
alaa sufi - avatar
0
Can you share the code
26th Dec 2020, 3:56 AM
Julian Bents
Julian Bents - avatar
0
alaa sufi share you code so we can look into it
26th Dec 2020, 3:57 AM
Art1mis
0
In the Julian Bents code give my this error SyntaxError unexpected token => in line 3
26th Dec 2020, 4:01 AM
alaa sufi
alaa sufi - avatar
0
Julian Bents shared code is working fine in my device. However, if you are getting the SyntaxError then check if Sololearn app is updated or not.
26th Dec 2020, 4:04 AM
Art1mis
0
Maybe your device don't support arrow functions or is just outdated
26th Dec 2020, 4:05 AM
Julian Bents
Julian Bents - avatar
0
Its last version 4.2.0
26th Dec 2020, 4:08 AM
alaa sufi
alaa sufi - avatar
0
Art1mis yes its work
26th Dec 2020, 4:18 AM
alaa sufi
alaa sufi - avatar
0
Do you mean i need always import the script above the code?
26th Dec 2020, 4:19 AM
alaa sufi
alaa sufi - avatar
0
Its work now I update the webview thanks alot
26th Dec 2020, 4:43 AM
alaa sufi
alaa sufi - avatar