JavaScript Blackjack
Better user experience

JavaScript is primarily for web browsers with some exceptions (like node.js). Unless your using node, you won't be able to get user input using the console. Instead of using console.log("New Hand: " + handValue) use:

alert("New Hand: " + handValue);


and to get user input you can use:

var userResponse = prompt("Dealer hits, do you HIT or CALL?");


Check out this JSFiddle to see alert and prompt in action.

You could create a much more interactive user experience using HTML, but since you're quite new to JavaScript, alert and prompt should be fine for now.

Abstracting duplicate code - Create a function to get cards

Currently, you use a randomInt function to hit the dealer and user with a new card. A random int from 1 to 11 sort of works, but it's statistically inaccurate with a deck of cards. As you get better and better at JavaScript you may eventually refactor want to edit your code to more closely models a deck of cards:

// Here is some code that more closely models a deck of cards
var cards = [];
for (var i = 1; i &lt; 11; i++) { // for cards 1-10
  cards = cards.concat([i, i, i, i])
}
cards = cards.concat((new Array(12)).fill(10));

function drawCard() {
  return cards.splice(randInt(0, cards.length), 1);
}


The only problem is that your code is not prepared for such a refactor. You'll need to change all your calls to randInt that are intended to return cards to the new function. To prepare for this refactor, you can abstract the way you get cards into a function:

function drawCard() {
  return randInt(1, 11); // for now
}

// here are your first two cards
handValue += drawCard();
handValue += drawCard();

// here are the Dealers cards
dealerValue += drawCard();
dealerValue += drawCard();


Now any changes to your drawCard function will be changed throughout all your code.

Keeping track of cards given to dealer and user

You could keep track of the cards dealt to players by using arrays. Use one array for each player:

var userCards = [];
var dealerCards = [];

function hit(array) {
  array.push(drawCard());
}

function printHand(message, cards) {
  alert(message + "\n" + cards.join(", ");
}

//usage
hit(userCards);
hit(userCards);
hit(dealerCards);
hit(dealerCards);

printHand("You have:", userCards);
printHand("Dealer has:", dealerCards);


To get the sum of a hand, you can use a for loop:

function getTotal(cards) {
   var sum = 0;

  for (var i = 0; i &lt; cards.length; i++) {
    sum += cards[i];
  }

  return sum;
}