Whats Wrong with my code - Driving me mad - Rock Paper Scissors x99

Hi working through the Rock Paper Scissorsx99 project but can’t get my code to pass one of the edge case tests. Basically this section ‘should return null if any move types or values are missing’ my code for the section is below. Without the code I pass all but this test case, but with the code inserted, I pass this one test but then fail the rest of them. I’ve seen the solution but don’t understand why my way doesnt work.

if (!playerOneMoveOneType || !playerOneMoveOneValue || !playerOneMoveTwoType || !playerOneMoveTwoValue

      || !playerOneMoveThreeType || !playerOneMoveThreeValue || !playerTwoMoveOneType || !playerTwoMoveOneValue

      || !playerTwoMoveTwoType || !playerTwoMoveThreeType || !playerTwoMoveThreeValue)

      {return null;}

Hey there @stephenhaley96905571!!

Do you have a link to this problem? I am unfamilier with it.
Also what language is this? It appears to either C++ or C#, though there are several similar languages.

Hi, thanks for the reply. Sorry I should have gave more detail. It is in Javascript (or my attempt at it). It is part of the Rock Paper Scissors x99 problem (Rock Paper Scissorsx99

Here is a link to my full code: RPS Code and the supplied test code https://github.com/hale1986/Rock-Paper-Scissorsx99/blob/master/test.js

Let me know if you need any other info!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.