What are right ways to learn JS in FCC?

I am in ES6 section in FCC and i can see that i am started meeting new JS properties which i never heard about before, for examples for last couple of chapters i met following guys:

  • higher order functions
  • .prototype
  • array.prototype.slice()
  • string.prototype()

i have googled everything so i am not looking for explanation.

but i will like to know what is the best way to learn so i am having atleast basic knowledge of all new properties a bit in advance so i see them and i can understand what they do.

how to keep up with useful properties as i go further in the course?

mdn is your friend. If you google, say, array.slice() mdn the doc page will be the first or second result. and you can click through all the array methods in the list on the left of the screen. And play with things. try them out in different ways.

And probably the best way to learn stuff is to help others here. If you think you mostly know something, answer the question but do the due diligence to make sure you know it. you with both teach them and burn it more into your own brain.

Something else that I did was to go back and refactor previous lessons as I learned more advanced techniques.

1 Like

You will use them all the time, but you will very rarely use the word prototype. Prototypes are props and methods on an object.

Example like writing .length on an array.

Before you chained your prototypes to your object to add methods etc. Now its easier to use classes.

If you create a new Array it inherits from array.prototype and gets all methods from that object.
But you dont write myarray.prototype.sort() you write myarray.sort().

1 Like

The ES6 section is a bit wierd - all the other sections gradually build up the knowledge and kinda introduce a single concept at a time, whereas the ES6 section dumps a load of concepts on you without warning. Most of the things it dumps on you are actually explained incrementally in other parts of the JS curriculum, so IMO if you’re stuck, go through the functional and OO sections first then come back to ES6.

(Note prototype is key in JS, it’s how inheritence works: basically, everything is an object, and all objects have this prototype property they can access. To avoid having to code [for example], a push() function on every single array you ever write that you want to use push() on, it only exists once on an Array.prototype and every single array can access it.)

2 Likes