senior-knights / course-schedulizer

📝 Create semester schedules without stress
https://senior-knights.github.io/course-schedulizer/
MIT License
10 stars 4 forks source link

Refactor: make more use of getSectionName() in place of redundant code that does that task inline. #288

Open rpruim opened 1 year ago

rpruim commented 1 year ago

Example of code that can probably be replaced with getSectionName():

  const newSectionName = `${newCourse.prefixes[0]}-${newCourse.number}-${newSection.letter}`;

Searching for prefixes[0] will locate several places where we could do this refactoring, I think.