You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web-Dev-For-Beginners/translations/en/2-js-basics/3-making-decisions/assignment.md

1.9 KiB

Operators

Instructions

Experiment with operators. Here's an idea for a program you can create:

You have a group of students from two different grading systems.

First grading system

One grading system uses grades ranging from 1 to 5, where a grade of 3 or higher means the student passes the course.

Second grading system

The other grading system uses the grades A, A-, B, B-, C, C-, where A is the highest grade and C is the lowest passing grade.

The task

Using the array allStudents, which represents all students and their grades, create a new array studentsWhoPass that includes only the students who pass.

TIP: Use a for-loop, if...else statements, and comparison operators:

let allStudents = [
  'A',
  'B-',
  1,
  4,
  5,
  2
]

let studentsWhoPass = [];

Rubric

Criteria Outstanding Satisfactory Needs Improvement
A complete solution is provided A partial solution is provided A solution with errors is provided

Disclaimer:
This document has been translated using the AI translation service Co-op Translator. While we aim for accuracy, please note that automated translations may include errors or inaccuracies. The original document in its native language should be regarded as the authoritative source. For critical information, professional human translation is advised. We are not responsible for any misunderstandings or misinterpretations resulting from the use of this translation.