13/13


#1
var age = [37,32,7,5,12,40];
var j;
var a =0;
var b =0;
var count = function(x,y) {
    for ( j = 0;j<age.length;j++) {
    }
        console.log(age[j]);
    for ( j = 0;j<age.length;j++){
        if (age[j]<30){
            x+= j;
        }
        else {
            y+=j;
        }
    }
    console.log("There are + "x" + people below 30");
    console.log("There are + "y" + people above 30");
};
count(a,b);

this is my code.
But it says SyntaxError: missing ) after argument list


#2

Just edited so your code is formatted. Remember to use preformatted text.

Perhaps the problem is to do with your first for loop you'll see there is no code in it.


#3

Actually your problems are with the console.logs

You need to end the quote after There are then +
So it looks like this "text" + var + "text" :smile: