## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# A mistake? But better :D

I got confused and thought he mean to make different students with different properties so yea i did this xD i could have done what he actualy wanted way easier, check it

```var students = [
];

function randomNumber(lowNum, highNum) {
var answer = Math.floor(Math.random() * (highNum - lowNum + 1) + lowNum );
}

function randomTrack() {
var track = Math.floor(Math.random() * (3 - 1 + 1) + 1 );
if (track === 3) {
track = 'Front-End development';
} else if (track === 2) {
track = 'Back-End development';
} else {
track = 'Graphic Designer';
}
return track;
}

function nameRandom(howMany) {

var whatName = Math.floor(Math.random() * (howMany - 1 + 1) + 1);
var nameArray = ['Corliss',  'Salina',  'Melissia', 'Shona',  'Edda',  'Taryn',  'Rosalina', 'Honey',  'Francine',  'Robyn'];
whatName = nameArray[whatName];
return whatName;
}

for (i = 0; i < randomNumber(5, 10); i++) {
students.push(
{
name: nameRandom(randomNumber(1, 10)),
track: randomTrack(),
achievements: randomNumber(0, 10),
points: randomNumber(0, 50) + '<br>'
}
)
}
var holder = '';
for (i = 0; i < students.length; i++) {
for (key in students[i]) {
document.write('<b>', key, ': ', students[i][key], '</b>', '<br>');
}
}
```

Try it out in workshop or whatever text editor you're using and keep refreshing