JavaScript DOM Scripting By Example Improving the Application Code Next Steps

Hakim Rachidi
Hakim Rachidi
37,409 Points

Scripted or prototyped structure ?

I decided to extend this project by building up a constructor 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 follows the separation-of-concerns rule.

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