Which version of Javascript to learn?

I want to learn javascript/JS so that I can use testing tools based on JS. Some courses are based on “vanilla” JS and some on Ecmascript ES6. What is the difference between those “flavors” of JS ? Is it okay to do the ES6 course or look for one with a newer version of ES ?