immersion2/day6/challenge/main.js
// gets a Student from Students by its ID
gets a Student from Students by its ID
gets a Student from Students by its ID
function studentsGetStudent(students, id) {
    if (students !== null && (id) <= students.length) {
        return students[id - 1]; 
    }
    return null;
}
function studentsGetStudent ( students , id ) { if ( students !== null && ( id ) <= students . length ) { return students [ id - 1 ] ; } return null ; }
gets a Student from Students by its ID
gets a Student from Students by its ID
// Example: student of ID 3 in slot 2