UNPKG

qcobjects-docs

Version:

The official app and website for documentation of QCObjects

27 lines (19 loc) 660 B
### New Creates an object instance of a QCObjects class definition. #### Usage: ```javascript let objectInstance = New(QCObjectsClassName, properties); // where properties is a single object with the property values ``` NOTE: In the properties object you can use single values or getter as well but they will be executed once. #### Example: ```javascript Class('MyCustomClass',Object); let objectInstance = New(MyCustomClass,{ prop1:1, get randomNumber(){ // this getter will be executed once return Math.random(); } }); console.log(objectInstance.randomNumber); // it will show console.log(objectInstance.prop1); // it will show number 1 ```