sudheerj / javascript-interview-questions

List of 1000 JavaScript Interview Questions
24.33k stars 6.92k forks source link

Inadequate information & grammar fix suggestion #254

Closed kenshanta closed 6 months ago

kenshanta commented 6 months ago

Not a major issue as the context can be understood without focusing on the semantics.

By default the first option is invalid as its commonly advised against to define methods nested in the constructor function (unless its via the prototype obj) So I assume the second option is the correct form. (waiting to hear back on this)

Ideally I suggest starting the section with additional information before getting to the point on how to utilize the prototype object; for example:

When you create an object using a constructor function or a class, the created object inherits properties from a prototype object.
// CURRENT SENTENCE The prototype on object instance is available....
Screenshot 2024-05-16 at 6 30 42 PM
sudheerj commented 6 months ago

@kenshanta Thanks for the details. It has been corrected.