Created
March 14, 2022 21:45
-
-
Save zt4ff/6c3c41af99744f5ff4d9bf3fbf1a3f0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.js | |
let counter = 0; | |
const generateId = () => {/* */}; | |
class StudentManagement { | |
constructor() {/* */} | |
add() {/* */} | |
getStudent() {/* */} | |
score(id, performance) { | |
if (performance >= 0 && performance <= 100) { | |
this.#students.find((student) => { | |
if (student.id === id) { | |
student.performance = performance; | |
} | |
}); | |
} else throw new Error("Score should be between 0 and 100"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment