Introduction

This document provides the JavaScript coding standards for development. The goal is to define guidelines to enforce consistent style and formatting and help developers avoid common pitfalls and mistakes.
Code style is about consistency and discipline, and there's no real right or wrong. The first step would be to adhere to the style of the used platform and stick to that. It helps others reading your code, and helps you read the code of others in the same ecosystem, and can only be decided by personal preference. Guidelines posted here are not rules that you should comply to, but consider them as suggestions that can improve your code quality

Naming Conventions

Consistency is the key to maintaining code. This statement is most true for naming your projects, source files, and identifiers including variables, properties, methods, parameters, classes, interfaces, and namespaces.
Identifier Type Rules for Naming Example
Namespaces Pascal Case; should start with the company namespace, followed by application "layers" as applicable Mcn.Contacts
Classes Nouns in Pascal Case class Mcn.Contacts.ManageContactsViewModel
Functions Verb or Verb/Noun pair in Camel Case initializeData ();
Constants All uppercase with words separated by underscores var MAX_CONTACTS_TO_DISPLAY = 200;
Instance Variable Camel Case var currentContacts = null;
Local Variable Camel Case var callBacks = {};
Parameters Camel Case function (contactSearchFilter)

Case sensitivity

To avoid confusion, follow these rules regarding the use of case sensitivity; do not create:

Coding Style

Consistent layout, format, and organization are keys to creating maintainable code. The following sections describe the preferred way to implement source code in order to create readable, clear, and consistent code that is easy to understand and maintain.

Formatting

Commenting

Visual Studio .Net Environment Setup

Language Usage

Variables and Types

Comparisons

Type Comparisons

Always use the following for type comparisons:
Hope that would help somebody. You can also download the guidelines, please find it attached.