I want to consult the community about this code declaration this is my code :
static pickSubstituteTeacher(substituteTeachers) { return substituteTeachers[Math.floor(Math.random() * substituteTeachers.length)];
}
the developer in the codecamp wrote it this way
static pickSubstituteTeacher(substituteTeachers){
let subNum = Math.floor(Math.random() * substituteTeachers.length);
return substituteTeachers[subNum]; }
Is my way of declaring the statemen all right or should I just follow the developers way of declaring the statement?