So I am building an election script that assigns candidates to partys and electorates then assigns them their votes but I am so scrambled so if someone can help me understand what I'm doing, for instance this function here:

```
        class Electorate    {
constructor (newNames) {
this.name = newNames
this.allMyElectorates = []
this.addWinner = []
this.addPartyVotes = []
    }
    addElectorate (...newNames) {
        for(let i=0;i<newNames.length;i++){
            var newElectorate = new Electorate(newNames[i], this.addWinner, 
            this.addPartyVotes)
            this.allMyElectorates.push(newElectorate)
            return newElectorate
    }
}
    addWinner(...newNames){
        theParty = myElection.findParty (partyName)
            if (theParty == undefined){
                myElection.addIndependant (cadidateName)
            }else{
                theCandidate = theParty.findCandidate (candidateName)
            }if (theCandidate == undefined) {
                theParty.addElectorateMP  (candidateName, this)
            }else{
                theCandidate.setElectorate (this)}
        }
    function totalVotes(...newNumbers){
        for(let i=0;i<newNumbers.length;i++){
            var newTotalVotes = new totalVotes(newNumbers[i], this)
            this.addPartyVotes.push(newTotalVotes)
            return newTotalVotes
        }
    }
    function addWinner(...newNames){
        for(let i=0;i<newNumbers.length;i++){
            var addWinner = new Winner(newNames[i], this)
            this.addWinner.push(newWinner)
            return addWinner
        }
    }

}

```

And this is what I'm trying to reference at the moment:

```
 anElectorate = theElection.addElectorate('Auckland Central')
 anElectorate.addWinner('KAYE, Nicola Laura', 'National Party')
 anElectorate.addPartyVotes(329, 85, 10, 486, 3, 2, 6242, 553, 6101, 158, 
                            12652, 1459, 7, 17, 53, 99)

```

I want to create a new function (totalVotes) using data collected from addPartyVotes (in the controller class) that has to to be called from other classes, it has it's variables and I'm pushing it out in an array then returning it so what am I doing wrong? 

I've tried asking people in my class and the tutors but I feel like they just fob me off without giving me any real guidance, I'm an engineer not a programmer so this is very difficult to wrap my head around.