atk=0traits=$dataWeapons[1].traitsfor (var i = 0; i < traits.length; i++) {if (traits[i].code == 21 && traits[i].dataId == 2) atk += traits[i].value}console.log(atk)
atk=0 traits=$dataWeapons[1].traits for (var i = 0; i < traits.length; i++) { if (traits[i].code == 21 && traits[i].dataId == 2) atk += traits[i].value } console.log(atk)