getting an error on jslint while creating a new object using javascript

Posted by user3712689 on Stack Overflow See other posts from Stack Overflow or by user3712689
Published on 2014-06-11T21:20:24Z Indexed on 2014/06/11 21:24 UTC
Read the original article Hit count: 300

Filed under:
|
|
|
|

For some reason this code is giving a lint. I can't really figure out why. It says: 'was expecting a assignment or function call, and instead saw an expression.' What does that mean?

window.onload = function (){ 

    function SuspectOne (naam, leeftijd, wie){
        this.naam = Spencer Hawes;
        this.leeftijd = 22;
        this.wie = zoon van de man;
    }

     function SuspectTwo (naam, leeftijd, wie){
        this.naam = Tyrone Biggums;
        this.leeftijd = 28;
        this.wie = lokale herionejunk;
    }

     function SuspectThree (naam, leeftijd, wie){
        this.naam = Ellie Campbell Hawes;
        this.leeftijd = 40;
        this.wie = vrouw van de man;
    }

    var verdachten = new Array[];
    verdachten[0] = new Verdachte("Spencer Hawes", 22, "zoon van de man");
    verdachten[1] = new Verdachte("Tyrone Biggums", 28, "lokale herionejunk");
    verdachten[2] = new Verdachte("Ellie Spencer Hawes", 40, "vrouw van de man");

    for(x=0; x<verdachten.length; x++){
        console.log("De verdachte is de  " + verdachten[x].leeftijd + "jaar oud " + verdachten[x].naam  + ", de " + verdachten[x].wie);
    }

};

Can someone help me with this? I would really like a lint free code.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about function