DEV Community

Discussion on: Functions in JavaScript

Collapse
 
pierrewahlberg profile image
Pierre Vahlberg

This was a good read overall, my only feedback would be that the part about methods being a little off. First out is that Array.push() is a prototype method that does not only accept integers, but any value (almost).

My understanding is that methods belong to an object - which all things in JS are but i refer to the commonly known object x = {}

That brings the prototype into play but also the methods/functions execution scope - the "this" keyword, which is only ever present in methods.

Also the term Closure is widely used in articles and could be mentioned here

Everything else you wrote was very good! I hope you appreciate me writing this in hope you wish to improve 🙏

Collapse
 
shatakshig8 profile image
Shatakshi Gupta

Hi Pierre! This article is more beginner intended to explain complex topics through example so that beginners can understand it well. Also, Thanks for providing your feedback. :)