Okay...begins to make more sense.
is fine, though I would have used a more descriptive name. After all, you use those images for the dealer's cards, as well. Maybe cardImage[ ]
But that's quibbling.
randomC() takes the RANDOMCARD and assigns it a card VALUE based on a case switch statement.
Bad design. (Also misleading name.)
I would have written it as
function cardValue( card )
NEVER depend upon passing global variables around from function to function if you can help it!
If you were going to do that, you could have had Deal( )
set a global variable with the card's value. But even that is bad design.
In place of document.write, you should use DOM methods.
<td><img id="PC1" alt="player card 1"/></td>
<td><img id="PC2" alt="player card 2"/></td>
<td><img id="DC1" alt="dealer card 1"/></td>
<td><img id="DC2" alt="dealer card 2"/></td>
function dealTo( whom, imagePrefix )
var total = 0;
for ( var c = 0; c <= 1; ++c )
var card = Deal();
total += cardValue( card );
document.getElementById( imagePrefix + (c+1) ).src = playerC[card]; // I'd still rename playerC
whom[c] = card;
function newGame( )
playerCards = ;
dealerCards = ; // better than setting length to zero...start with clean array
playerTotal = dealTo( playerCards, "PC" );
dealerTotal = dealTo( dealerCards, "DC" );
... other code ...
Yes, you should put the JS code *AFTER* all the HTML, just before the </body> tag.