class Factory{ constructor(arrayOfAttributes){ let length=arrayOfAttributes.length this.product=this.concreteCardCreation(arrayOfAttributes,length); console.log("arrayOfAttributes",this.funArrayOfAttributes(arrayOfAttributes)); console.log("attributesDictionnary",this.attributesDictionnary(arrayOfAttributes,this.funArrayOfAttributes(arrayOfAttributes))) } /** * * @param {*} arrayOfIdxAttributes index of attributes in ATTRIBUTES * @returns array of all attributes */ funArrayOfAttributes(arrayOfIdxAttributes){ let attr=[]; let l=arrayOfIdxAttributes.length; arrayOfIdxAttributes.forEach(e => { for (let i=0;i