JavaScript DOM Scripting By Example Improving the Application Code Next Steps

Hakim Rachidi
Hakim Rachidi
29,655 Points

Scripted or prototyped structure ?

I decided to extend this project by building up a contructor which defines an Invitee called Person. After some frustration I saw the benefits and downsides of this structure. Sometimes it's harder to write than to read because model (Person) and program are separated. On the other hand would this approach follow the separation-of-concerns rule.

My question is what is more common in JavaScript and are there any improvements to make?