Closed ronen-e closed 3 years ago
in the section Class-Like Structures in ECMAScript 5 the following sentence is somewhat confusing:
In this code, PersonType is a constructor function that creates a single property called name.
PersonType
name
Reason: The return value of PersonType is unclear. the constructor function returns an instance with a single property and returns it.
Solution:
In this code, PersonType is a constructor function that creates an instance with a single property called name.
The text above gives a clearer meaning for the return value of the PersonType constructor.
Yup, definitely some missing words in there. Thanks for letting me know.
in the section Class-Like Structures in ECMAScript 5 the following sentence is somewhat confusing:
Reason: The return value of
PersonType
is unclear. the constructor function returns an instance with a single property and returns it.Solution:
The text above gives a clearer meaning for the return value of the
PersonType
constructor.