Thanks Indie,
Here are some examples of what i am thinking about:
3. Global variables
It turned out that I have a lot of global variables. I am not sure this is good practice. Do professionals avoid global variables, if yes are there different techniques for that (i know of static local ones, is this used extensively)?
4. etc.
there could be all kind of additional issues that professional C2 developers know about and deal with in a production environment -- i wonder what those are ... what makes product code different to prototype code ... thats my question
3. Its not bad to use global variables. You have to assess each case if using a global variable makes sense and is the best option. Other options include reading from json, xml files for large amounts of static data, Local and Session Webstorage, Local variables, etc.
4. I think you want to skip the step of writing the "prototype code" and go straight to the "production code". Unfortunately you can't skip this step. The link between these is time + experience + testing!