Home > front end > How to create a node object variables, initialize the same value
How to create a node object variables, initialize the same value
Time:12-12
How to simplify the creation of iconArray this object
Var iconArray= { Icona: document. The createElement method (' div '), Iconb: document. The createElement method (' div '), Iconc: document. The createElement method (' div ') }
CodePudding user response:
You put an object in this meaningless, so see you like this, does not want to reuse the same business logic, you according to your actual demand after extraction as a function to call