Home > Article > Web Front-end > Defining objects in javascript factory mode_Basic knowledge
Each function object has a length attribute, indicating the number of parameters the function expects to receive.
About the object-oriented creation method of js,
Target:
Construct an order object.
Contains three attributes: date, amount, submitter
Contains a method: display string: "XX submitted an order with an amount of XXXX yuan at XXXX-XX-XX"
1 Factory method