0
Pls i dont understand why my sololearn app fail to run any variable i declare using LET.... It always gives me an error reading
let name = 'David'; let msg = 'Welcome ' + name + '!'; console.log(msg); Even something as simple as this
6 Réponses
+ 1
Show your code.
btw JS is case sensitive , you need to use keyword `let` not `LET`
edit:
Oreva Lyt thanks for including code, I see no errors ,it's working. share a screenshot of errors or warnings that you are getting.
+ 1
Pls check my new post
I couldnt share the screenshot on this one
+ 1
Oreva Lyt ,
That's weird.Never faced this issue.
I think you are using an old device.
According to a mail I received from SL "web codes run on users device not on SL servers" // maybe php is still running on servers.
So I assume that it uses Android WebView. I'm not sure though.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let
According to MDN documentation `let` is not supported for version 41 to 49 and a note is given about using strict mode.
So hopefully, try enabling strict mode by writting
"use strict" in beginning of script.
Or try to update webview from play store (in case you are android user) I'm still not sure if this is reason of issue and strict mode or updating webview will solve problem but try to do.
https://code.sololearn.com/W8HDVWsfwzN4/?ref=app
+ 1
Ok thanks i try the solutions you gave
0
Oreva Lyt
Can you please recheck this code?
https://code.sololearn.com/W8HDVWsfwzN4/?ref=app
If it keeps giving you errors please consider reinstalling app.
If issue doesn't get solved try to contact SL team via info@gmail.com
0
Same result
But when i change it to var it runs well