
Modern JavaScript Tutorial - galfarragem
https://github.com/iliakan/javascript-tutorial-en
======
faitswulff
This is the source for the website at
[https://javascript.info/](https://javascript.info/) . It's actually quite
good - I'm reading about garbage collection at the moment. Looking forward to
the inheritance/prototype section, something that's never quite stuck for me.

~~~
baron816
> Looking forward to the inheritance/prototype section, something that's never
> quite stuck for me.

I glanced through the section and I don't know how much it's going to help.

What helped me was to stop thinking that JS had inheritance at all.
Inheritance implies some sort of copying and combining of object behavior. In
a language with classical inheritance, a child class has all the methods of a
parent class. A instance object of a class has all its methods plus all of its
parent's methods directly on it.

JS doesn't do that. When you create an object that has a parent, you're
creating two objects (the parent and the new child). When you call a method on
the child that comes from the parent, the child doesn't hold that method, the
parent does, so it delegates to the parent.

So, I think when people ask you in an interview whether JS has classical
inheritance or prototypal inheritance, you should say neither--it has behavior
delegation.

Please let me know if that makes sense.

~~~
chris_wot
Isn't delegating to the parent object prototypical inheritance?

~~~
baron816
Yes, that's what we call prototypal inheritance. What I'm saying is that I
don't think it's a good name for what's going on, since it clearly causes a
lot of confusion.

~~~
paulddraper
Eh, I think that's debateable.

Agreed that delegation is more clear though.

------
grondilu
Question:

I started a JS project lately, I tried to write it as modernly as possible
(using as many ES6 features[1] as I could), and yet I stumbled on difficulties
that I blame to the lack of type system and polymorphism.

I'm considering writing my project in a typed language that compiles to JS,
such as Scala or Haskell. But I would have to learn that language basically
from the start.

Is it a good idea and if so which language would you recommend?

~~~
sorokod
Kotlin

~~~
Can_Not
Any tutorials or starter boilerplates on using kotlinjs or bucklescript with
vuejs would be much appreciated.

------
edzo
Do you guys know a good tutorial for focused on server side js (node, express,
etc) Whats the best resource to learn node? Thanks in advance

~~~
Can_Not
[http://expressjs.com/en/guide/routing.html](http://expressjs.com/en/guide/routing.html)

Expressjs official guide (there are more guides after routing)

[https://github.com/sahat/hackathon-
starter/blob/master/READM...](https://github.com/sahat/hackathon-
starter/blob/master/README.md)

git clone this and add a feature or convert it into a small prototype of an
app. If you're out of ideas, switch out mongodb for postgre. Does the tests
still work? If you can add something interesting, send a PR. Read the entire
readme.

[https://blog.feathersjs.com/a-real-time-chat-frontend-
with-p...](https://blog.feathersjs.com/a-real-time-chat-frontend-with-plain-
javascript-and-feathers-34e92bcce386)

Make a chat room with feathersjs.

[https://stackoverflow.com/questions/2353818/how-do-i-get-
sta...](https://stackoverflow.com/questions/2353818/how-do-i-get-started-with-
node-js)

More resources

