Create a program with if else, through which the variable โpointsโ will be compared.
If the points are between 50-60 students have received a grade of 6, if they are between 61-70 students
has received a grade of 7, if they are between 71-80 the student has received a grade of 8, if they are between
81-90 student received a grade of 9, if they are between 91-100 the student received a grade of 10, and if
points are below 50 then the student has not passed the course. The result is displayed with console.log.
Create a ternary operator program that shows whether the student has passed the course or not.
If the points are more than 50 students have passed the course, otherwise not.
The result should be displayed with console.log.
Well, I would suggest doing the first section freeCodeCampโs JS curriculum.
Once you do the 100+ lessons, you will have all of the tools necessary to solve this problem.
From there, break down this challenge into small bite size pieces.
A good place to start would be here
Creating variables doesnโt require a lot of code.
Then you can slowly go through this if else statement.
Start with this first one.
Try it on your own, if you get stuck then come to the forum with your code and we can go from there.
Once you figure out that first one, then it will be easier to tackle the rest of the conditions.
The final part would be to return this ternary operator
that is the roadmap.
Like I said earlier, before you tackle any parts of this challenge, make sure to go through the first part of the fcc javascript curriculum because it will help you alot.
Screenshots are hard to read.
Can you write your code in the forum?
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the โpreformatted textโ tool in the editor (</>) to add backticks around text.
You can just google ternary operator and how to use it.
But also, it seems like they want you to create a function with your if/else statement inside that returns the ternary result.
I would double check on the instructions.
Or if this is a class, ask your instructor for clarification on the directions.