diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 9ddc6a5067..7ae351ca14 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1373,7 +1373,7 @@ "}" ], "tests": [ - "assert((function(){var data = runSlots();if(data === null){return true}else{if(data[0] === data[1] && data[1] === data[2]){return true;}else{return false;}}})(), 'If all three of our random numbers are the same we should return that number. Otherwise we should return null.')" + "assert((function(){var data = runSlots();return data === null || data.toString().length === 1;})(), 'If all three of our random numbers are the same we should return that number. Otherwise we should return null.')" ], "challengeSeed": [ "fccss", @@ -1556,9 +1556,10 @@ " ", " // Only change code above this line.", " ", - " if(slotOne !== slotTwo || slotTwo !== slotThree){", - " return null;", + " if(slotOne === slotTwo && slotTwo === slotThree){", + " return slotOne;", " }", + " return null;", " ", " if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){", " $(\".logger\").text(slotOne);", @@ -1726,9 +1727,10 @@ " ", " // Only change code above this line.", " ", - " if(slotOne !== slotTwo || slotTwo !== slotThree){", - " return null;", + " if(slotOne === slotTwo && slotTwo === slotThree){", + " return slotOne;", " }", + " return null;", " ", " if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){", " $('.logger').html(slotOne);", @@ -1860,4 +1862,4 @@ "challengeType": 0 } ] -} \ No newline at end of file +}