I've taken on the challenge of learning JS by myself and decided to build a Blackjack game. While following a helpful walkthrough online, I encountered some confusion.
On the website, they start by declaring Global variables:
var deck;
var burnCard;
var dealer;
var player = new Array(maxSplits + 1);
var curPlayerHand, numPlayerHands;
var credits, defaultBet;
var creditsTextNode, defaultTextNode;
I understand that you can declare multiple variables on one line, such as var x, y; however, I'm unsure why in this case it's used for some variables but not others. Why is it impossible to do something like
var = deck, burnCard;
for example?
If there's anything important that I've missed, please inform me so I can include it. Thank you.