It's not actually a problem with your if
statement itself. It appears that this:
newcard = Math.floor(Math.random() * 1000 % 52)
is being done once rather than every time you hit. That means you will get the same card over and over.
You should probably recalculate a new card every time you perform a hit operation.
You should probably also look into how you're generating cards. Normally, you would use a deck (containing one or more "real" decks) so that the probabilities change as cards are removed, just like in real life.
That would also fix any skewing problem from using * 1000 % 52
which would tend to prefer cards at one end of the "deck".