My code failing despite me having followed the test

Hey :waving_hand: everyone, greetings :smiley:!

Please help me. I’m currently undertaking JavaScript, and the above is a screenshot. Despite my code looking as expected by the test, still it’s failing, and I’ve checked where the errors might be and even compared my written code to test, still no success. Please help me.

Thanks .

it is really difficult to read the picture of a screen

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Continuing the discussion from My code failing despite me having followed the test:

Hi, below are both the test and code - hope it’s clearer for one to read. If I may ask, it is normal or just an issue in Javascript that even well typed code as expected from the test can still be an issue and thus fail, and even when I check my code for mistakes I fail tosee them, but when I reset and retype the code it either works or not. So pls help me

Hi @mapandreading !As @ILM said in the previous subject, it is hard to read, understand and correct code when it’s an image and not text. So please, make sure to use next time the Help button ! It’s super easy :

  1. Click on the button in the bottom right corner (little bubble with the question mark).
  2. Be sure you have actively searched how to solve your problem (for furthermore info, click this link : read search ask method)
  3. Write a quick description about what is your problem and how you tried to solve it
  4. Upload and send !

And voilà, you have a full post ready that automatically contains all the info we need to successfully help you !

Hope this helped you, enjoy coding ! :slight_smile:

Hi @mapandreading

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.

As @ILM suggested, please use the Help button to send your code.

Or update your post to include your code and a link to the challenge.

There are two ways you can format your code to make it easier to read and test:

  1. After you copy/paste your code into the editor, select it by dragging your cursor over it then click the (</>) button in the toolbar to automatically wrap your code in backticks. (You can click on the animated demo image below to enlarge it.)

  1. Manually add three backticks on a new line above your code and on a new line after your code. Note that a backtick is NOT the same as a single quote('). To find the backtick key on your keyboard, see this post.

To see changes to your post as you make them, you can click the (M+) button on the toolbar to bring up the rich text editor:

Happy coding