Skip to content

Instantly share code, notes, and snippets.

@zt4ff
Created March 14, 2022 21:45
Show Gist options
  • Save zt4ff/4aa3378cbea7a11720ae991d6638cd59 to your computer and use it in GitHub Desktop.
Save zt4ff/4aa3378cbea7a11720ae991d6638cd59 to your computer and use it in GitHub Desktop.
// index.js
let counter = 0;
const generateId = () => {
counter++;
return counter;
};
class StudentManagement {
#students = []
constructor(students) {
this.#students = students.map((student) => {
return { id: generateId(), name: student, performance: null };
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment