A few months ago, we did training on some of the fundamentals of writing proper Javascript. From that training session, we decided to note down a few core guidelines: Avoid Global Variables Minimize the use…