Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (grade) {
- let grades = grade >= 2 && grade < 3.00 ? 'Fail':
- grade >= 3 && grade < 3.50 ? 'Poor':
- grade >= 3.50 && grade < 4.50 ? 'Good':
- grade>= 4.50 && grade < 5.50 ? 'Very good':
- grade >= 5.50 ? 'Excellent': "";
- console.log(`${grades.valueOf(grade)} (${ grade < 3? 2 : grade.toFixed(2)})`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement