Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Javascript - which version to learn ?

 
Ranch Hand
Posts: 141
5
IntelliJ IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to learn basic Javascript so that I can use it for test automation. I see some video courses which have "vanilla" javascript and ES6 (ecma script). ES6 was released in 2015 and the latest version of ES is 2019. Should I take the ES6 version course ? If not, then which version of JS (vanilla, ES) should I learn ?

Thank you !
 
Saloon Keeper
Posts: 11923
253
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd go with ES6, but you might need a transpiler to convert it to "vanilla" JavaScript, as not all browsers support ES6 natively, I think.
 
Sheriff
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your test automation engine support?
 
Tom Joe
Ranch Hand
Posts: 141
5
IntelliJ IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I'd go with ES6, but you might need a transpiler to convert it to "vanilla" JavaScript, as not all browsers support ES6 natively, I think.



Thanks. I searched more on Google and ES6 seems to be recommended more often. My confusion comes from these two udemy courses - course1 and course2. The same instructor has created two courses, one on JS and the other on ES6 JS. I don't know why he'd have two courses. Probably the JS one is for working with browsers and the ES6 one is mainly for working with node js and such, besides browsers.
 
Tom Joe
Ranch Hand
Posts: 141
5
IntelliJ IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:What does your test automation engine support?



I don't know. I am not working with any test automation engine now. I am new to JS and I am learning it for myself. But, I would like to use popular automation testing javascript tools and libraries like selenium, protractor, chai etc.
 
Bear Bibeault
Sheriff
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tom Joe wrote:I don't know why he'd have two courses. Probably the JS one is for working with browsers and the ES6 one is mainly for working with node js and such, besides browsers.


As Steven pointed out, broad browser support requires ES5 -- so if you are writing a basic web app that will use jQuery or other legacy tools, and don't want to deal with a build toolchain, you'd learn and use ES5.

However, modern web apps use ES6 (or TypeScript) and employ a transpiler to convert ES6 to ES5 for the legacy browsers. So ES6 is not limited to the NodeJS environment, but is widely used for browser web apps as well.

It all depends whether you want to be up-to-date with modern tooling, or write code as if it were still 2012.
 
Tom Joe
Ranch Hand
Posts: 141
5
IntelliJ IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:
As Steven pointed out.................It all depends whether you want to be up-to-date with modern tooling, or write code as if it were still 2012.



I want to be up-to-date with modern tooling only.
 
Bear Bibeault
Sheriff
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then ES6. The most widely used transpiler is Babel. It is usually used with webpack (or other bundler) to create a build toolchain.

Warning: webpack and bundlers are not for the faint of heart. Modern JavaScript build tooling is a complicated matter. It's best to find and use a starter application unless you want to spend some time getting to know the tools. (If you will be using React, create-react-app is a good one to start with.)
 
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic