You should always use === when checking for equality as == does not check whether the type is also a match. I do not think this will affect the outcome of the test but it is best practice for the future.
This block of code is not including the number “6” which needs to be accounted for and bunched with the first line of numbers.
I have also noticed the way you are chaining your ‘or’ statements is not correct. You need to reinitialise the variable. So, saying code === 10 || 'A' || 'B' is not the same as code === 10 || code === 'A' || code === 'B'
finally, your return statements do not seem to be correct. Try using the ES6 backticks. Here is an example of the first return statement using ES6:
That is ok mate. Everything I mentioned is what I changed from your code to make it pass all tests.
The main difference, for me, is that I simply used:
card < 7 && card > 1
As the logic for the first if function. As mentioned by @leebut, you can use a switch statement also, I personally choose to use the if function just as it is less typing.