Hi 👋
This is Suchintan a Full Stack Developer with MERN stack.
Want to know more about me?
Connect me on - https://www.linkedin.com/in/suchintan-das-b698bb1b8/
Thanks Luke , for sharing the amazing information. There are some stuffs I want to clear -
Regarding use of prototype.call on map and filter function. The reason why I shared it is because people can really understand the beneath concept and most of the time on internet they used to share the proper structure for these function but never used to show the use of that callback arguement.
//value for callback functionconstmap1=Array.prototype.map.call(array1,(x)=>{returnx*2});
//value for callback functionconstupdatearray=Array.prototype.filter.call(numbers,(element)=>{returnelement>6});
Due to this reason I thought it's important to show the main proper structure. Yes, it's just for your knowledge ! You don't have to use it on workplace , but it would help you build the base of JavaScript which is kinda important.
I'm a former teacher writing articles about software development and everything around it. My ambition is to provide people all around the world with free education and humorous reading.
I agree that it's important to understand prototypes in js, you should definitely teach about it.
But I think it will just confuse the target audience of this article. Begginer level developers who wants to learn about map and filters have no chance to understand how the prototype works by looking at a one liner example like that.
Hi 👋
This is Suchintan a Full Stack Developer with MERN stack.
Want to know more about me?
Connect me on - https://www.linkedin.com/in/suchintan-das-b698bb1b8/
Yes Dennis, I know it may be little bit difficult for the beginners to understand the prototypes in js.
That's the reason I only used the the structure avoiding too much explanation of it. In this way they will have the idea that the prototype structure is a bit complicated and that's why we use the first one on each of them.
It's like I introduced them that there are prototypes in JavaScript but knowing more about it comes as a choice to them.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks Luke , for sharing the amazing information. There are some stuffs I want to clear -
Regarding use of
prototype.call
on map and filter function. The reason why I shared it is because people can really understand the beneath concept and most of the time on internet they used to share the proper structure for these function but never used to show the use of that callback arguement.Due to this reason I thought it's important to show the main proper structure. Yes, it's just for your knowledge ! You don't have to use it on workplace , but it would help you build the base of JavaScript which is kinda important.
Hope it's clear now.
I agree that it's important to understand prototypes in js, you should definitely teach about it.
But I think it will just confuse the target audience of this article. Begginer level developers who wants to learn about map and filters have no chance to understand how the prototype works by looking at a one liner example like that.
Yes Dennis, I know it may be little bit difficult for the beginners to understand the prototypes in js.
That's the reason I only used the the structure avoiding too much explanation of it. In this way they will have the idea that the prototype structure is a bit complicated and that's why we use the first one on each of them.
It's like I introduced them that there are prototypes in JavaScript but knowing more about it comes as a choice to them.