Below figure has two important code snippets the top one is taken from components.js it defines the class definition and the second code snippet is of ASPX page which consumes the JavaScript class. So let’s understand all the numbered points one by one. 1 - In this section we register namespace using registerNameSpace function. We have named our namespace as NameSpaceCustomer. 2 - Here we have defined our class clsCustomer. 3 - We have defined two properties Customer Code and Customer Name. Both the properties have get and set function. We have also defined a read-only function getCodeAndName which returns the concatenation of customer code and customer name. 4 - Finally we register the class with the namespace. 5 - In this section we have consumed the class.getCOdeAndName will display the concatenated value of customer code and customer name.