- 2

Why is JS different here?

I can go to places like Code Academy and the JS there has completely different structures and new commands like console.log The only thing I can think of is that the JS here is somehow integrated with HTML but this is just really confusing and odd to me.

3rd Nov 2017, 3:30 PM
Trent Bly
Trent Bly - avatar
5 Réponses
+ 7
Apps use WebView. WebView is based on Chromium, a mobile (limited) version of Google Chrome. Your Android version determines when Google stops updating WebView. Once this happens, people use polyfills, libraries and ingenuity to 'fill in' most missing features until old hardware ages out and another one (with its WebView/ECMAScript ... i.e., javascript version) becomes common.
3rd Nov 2017, 4:13 PM
Kirk Schafer
Kirk Schafer - avatar
+ 8
@visph I know, right? It took me what felt like forever to realize people couldn't run many of my experiments, made worse because my tablet is javascript 5 + parts of 6. @Trent Bly: Can I Use? (feature queries, showing version support) http://caniuse.com/#feat=let Your webview version / HTML5 support matrix: https://code.sololearn.com/WeBKGPjY0UHK/?ref=app
3rd Nov 2017, 5:25 PM
Kirk Schafer
Kirk Schafer - avatar
+ 6
Refer to @Kirk answer: support depends on android and webview versions ^^ (well working for me ;P)
3rd Nov 2017, 5:12 PM
visph
visph - avatar
+ 5
You can use console.log() quite normally here also @@ What are the others "completly different structures and new commands" you're talking about?
3rd Nov 2017, 4:09 PM
visph
visph - avatar
0
visph, I'm talking about things like creating variables, using var let and const. const seems to work but I cant seem to get the variables in the "sandbox console" as I call it to be put together. If the variables do work then the interpolation doesnt work, ie console.log(`${myVariable}`) but it doesnt post the output. Also, in the tutorial you have all those </scripts> and whatever else, stuff I don't (or have yet to?) see in Code Academy.
3rd Nov 2017, 5:05 PM
Trent Bly
Trent Bly - avatar