Hi. I’ve used JavaScript often but I have a question.
I’ve started my curriculum on basic JS after completed the HTML curriculum and I have not started ES6 (or ECMAScript 2015) as my curriculum on this website. But what is the difference between basic JS and ES6?
I think we can stop making the distinction between “basic” JS and ES6 now. ES6 was so long again (in internet time) that it is basically standard today and thus can be considered “basic” JS. Unless you care about IE11 you don’t even need a transpiler to use all the new features introduced in ES6.
So my answer is that there is no difference because ES6 is “basic” JS now. But if you are curious as to what new features ES6 added then google “javascript new features in ES6”.
ES6 is JS, it’s just a newer syntax. All the same stuff, just a slightly different way of writing things, more intuitive in my opinion. You can mix a match as you learn if you want to, integrating more ES6 as you feel comfortable. It’s all the same language.
There are some new features also, but the biggest difference is that it reads better and it’s easier to follow.
For example, multiply all the numbers in an array by 2…
Before…
var numbers = [65, 44, 12, 4];
var numbersTimesTwo = numbers.map(myFunction)
function myFunction(number) {
return number * 10;
}