+ 2

Why does the the console return "unexpected identifier " when i use let to declare a variable..?

The let variable declararion

2nd Jan 2021, 12:41 AM
Programaster
Programaster - avatar
7 Respuestas
2nd Jan 2021, 1:15 AM
Programaster
Programaster - avatar
+ 3
No issue, the code works as expected, without error.
2nd Jan 2021, 1:17 AM
ChaoticDawg
ChaoticDawg - avatar
+ 3
Programaster Your phone webview does not support es6 codes, use Babel instead https://code.sololearn.com/WXiQ8miBDQh5/?ref=app
2nd Jan 2021, 2:56 AM
Calviղ
Calviղ - avatar
+ 1
Share your code so we can see the issue.
2nd Jan 2021, 1:11 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Check it out
2nd Jan 2021, 2:11 AM
Programaster
Programaster - avatar
+ 1
I did, and I get an output of: 2 2 2 1 without any errors
2nd Jan 2021, 2:13 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Yea..i would be using normal js until i get a new phone.
2nd Jan 2021, 7:59 AM
Programaster
Programaster - avatar