Live data from Hacker News

ES6 for beginners, part 3

hackernoon.com

21–30 of 30 posts

Re: ES6 for beginners, part 3

#21

I have kind of a tangential question. I have done back-end development, mostly with Python and Django. I know some basic HTML, CSS, and JavaScript but not much. A couple of years ago, when I started dabbling in web development, those were much smaller and less complex. You could go through a couple of resources (JavaScript: The Good Parts, jQuery documentations, etc.) and learn everything there was that you needed to…

I'd say, to refresh your memory, try and rewrite some of your old code with ES6 syntax. I don't think you even need a transpiler since new versions of node and chrome have very good support for new additions to the syntax. And if you used jQuery before, try to use native APIs too.

You'll end up with code that is almost unrecognizable but easier to read and …prettier?

If you don't come to like the language then, you'll find the ecosystem of transpilers and bundlers and tooling unbearable.

Re: ES6 for beginners, part 3

#22

I have kind of a tangential question. I have done back-end development, mostly with Python and Django. I know some basic HTML, CSS, and JavaScript but not much. A couple of years ago, when I started dabbling in web development, those were much smaller and less complex. You could go through a couple of resources (JavaScript: The Good Parts, jQuery documentations, etc.) and learn everything there was that you needed to…

I would agree that it looks very complex today. But it's not too challenging to learn.

I would advise learning React (they have both create-react-app and Expo now to make the experience simpler) from the docs.

When learning React, some things were alien at first, but after getting the basics down I realized writing JS applications with React felt much simpler than what I used to be doing. It resulted in shorter file lengths and cleaner code, and the concepts shouldn't feel too foreign if you have backend experience (it's probably harder if you learned JS through jQuery and webpage interactivity logic).

Re: ES6 for beginners, part 3

#23
post #5

Earlier quoted context omitted.

Well, JavaScript slowed down after ES2015 too. On the other hand, the module system really takes time and async/await was one big step.

I disagree! After ES2015 includes: * Async/await * a bunch of destructuring with the rest and spread operators * More class "nice to haves" like static properties and possibly more soon * Async iteration * Shared memory and atomics (which I'm not all that happy about, but many people are) And going even further "in the future" it might have stuff like: * Decorators (of they can ever settle on it!) * Observables * Def…

I was talking about the standardization.

Sure there is a bunch of proposals, but after ES2015 only a few per year are included.

Re: ES6 for beginners, part 3

#24
I stopped reading after this:

  let modifiedArr = arr.map(element => element * 10);
  console.log(modifiedArr);
  Cool right :)
...

  let modifiedAarr = arr.filter((element, index) => element%2 == 0)
  Hope you got it. And don’t forgot to notice, only the first parameter is mandatory. Other two parameters are optional.
  Array Reduce

Re: ES6 for beginners, part 3

#25

I have kind of a tangential question. I have done back-end development, mostly with Python and Django. I know some basic HTML, CSS, and JavaScript but not much. A couple of years ago, when I started dabbling in web development, those were much smaller and less complex. You could go through a couple of resources (JavaScript: The Good Parts, jQuery documentations, etc.) and learn everything there was that you needed to…

When you say "front end development", what exactly do you mean ? Because that will strongly influence what you need to learn. If you mean "JavaScript Programmer" then it'll be mostly JS focused, some tooling, some html and css but minor on those. If you mean a true frontend dev then you'll need a LOT more on CSS (Flexbox, Grids, box model, etc) and a bunch of UI/UX/HCI type reading in addition to learning in depth mo…

I had the "true frontend" case in mind: knowing sufficient HTML/CSS/JS that I can write complex client-side web applications by myself.

Re: ES6 for beginners, part 3

#26
Does it make sense to start learning EcmaScript today? More and more people are migrating to TypeScript as the coding language, WebAssembly has arrived to replace JavaScript as the browser native language other languages will compile to. Isn't EcmaScript going to become legacy soon? I'm actually curious, seriously, not trolling.

Re: ES6 for beginners, part 3

#27

Does it make sense to start learning EcmaScript today? More and more people are migrating to TypeScript as the coding language, WebAssembly has arrived to replace JavaScript as the browser native language other languages will compile to. Isn't EcmaScript going to become legacy soon? I'm actually curious, seriously, not trolling.

Around maybe 2015 there was a dilemma as to whether to go in a TypeScript direction or an ES6 direction from basic JavaScript. TypeScript has adapted since then so that it's more in harmony with ES6.

WebAssembly has arrived, but it has a long road ahead to popular use.

Re: ES6 for beginners, part 3

#28

Does it make sense to start learning EcmaScript today? More and more people are migrating to TypeScript as the coding language, WebAssembly has arrived to replace JavaScript as the browser native language other languages will compile to. Isn't EcmaScript going to become legacy soon? I'm actually curious, seriously, not trolling.

Typescript tries to be a pure superset of ECMAScript, so learning ES is still a useful starting place to working in Typescript.

WebAssembly currently has very different use cases than JavaScript, and still has a while before it could be considered the "native language" of the web given that there are still key web concepts like the DOM that WebAssembly currently does not speak.

ECMAScript is not yet in danger of becoming a legacy.

Re: ES6 for beginners, part 3

#29
post #3

Array.prototype.map()[1] has been in js since ES5. Likewise with filter[2] and reduce[3]... [1] http://es5.github.io/#x15.4.4.19 [2] http://es5.github.io/#x15.4.4.20 [3] http://es5.github.io/#x15.4.4.21

Yeah, it's strange - a lot of ES6/next tutorials seem to think that FP concepts in JS just showed up. I don't get it.

Possibly says something about how long it took for people to trust ES5 was supported by the browsers they were writing for. It seemed to some people that ES5 and ES6/ES2015 were added to browsers "at the same time", due to legacy effects of browsers many felt a need to support for far too long in major enterprise environments (IE6).

Re: ES6 for beginners, part 3

#30
post #23

Earlier quoted context omitted.

I disagree! After ES2015 includes: * Async/await * a bunch of destructuring with the rest and spread operators * More class "nice to haves" like static properties and possibly more soon * Async iteration * Shared memory and atomics (which I'm not all that happy about, but many people are) And going even further "in the future" it might have stuff like: * Decorators (of they can ever settle on it!) * Observables * Def…

I was talking about the standardization. Sure there is a bunch of proposals, but after ES2015 only a few per year are included.

ES2015 rolled up around five/six years worth of changes since ES5 (which we could call ES2009, I suppose), so of course it's going to feel like it standardized a bunch more stuff.

The new system is faster as annual releases, even if it seems like ES2016, and ES2017, seem "light" relative to previous standards.

Post reply on HN