Random exam generator
Library functions usage

The unique_exam function is basically checking if the exam is in the array or not and returning false if it is not, the includes method is what You need.

return ! exam_array.includes(exam)

Inline

dayAvailable


Should be inlined as it boils down to just one comparison, instead the number of exams per day should be saved as a constant.