Assesment for Conditional 2 Test

Hi there, i just tried to solve Conditional 2 test on MDN Site

i tried to solve but im stuck again. Pls help

here is the Link to Codepen:

Thx in Advance. Regards

This isquite a tricky one; see the marking guide at

Hi Chris,
the Conditional 2 Test is About scores and responses. Must be an other solution.

Conditionals 2 Test

My Code is as follows:

Code in Codepen

Thx for your help :slight_smile:

Nope, that’s the correct solution; click on the link through to the correct section of the page. What it is showing in this thread is not the correct bit.

Anyway, your code seemed to work ok, although I had to change it slightly so that the else part of the top level block works:

if(machineActive) {
  if(score < 0 || score > 100) {
    response = 'This is not possible, an error has occured.';
  } else if(score <= 19) {
    response = 'That was a terrible score — total fail!';
  } else if(score <= 39) {
    response = 'You know some things, but it\'s a pretty bad score. Needs improvement';
  } else if(score <= 69) {
    response = 'You did a passable job, not bad!';
  } else if(score <= 89) {
    response = 'That\'s a great score, you really know your stuff';
  } else if(score <= 100) {
    response = 'What an amazing score! Did you cheat? Are you for real?';
} else {
  response = 'The machine is turned off. Turn it on to process your score.';

But other than that, you are going in the right direction.

Nice. Didnt expect that it was that correct. Can you please tell me further, why variable para2 says undefined in my codepen Code ?.

Your score is 75 ----> this is para1
undefined ---->this is para2

Doesnt it has to say ‘The machine is turned off. Turn it on to process your score’ ?