Just like in C#, JavaScript utilizes conditional, control-flow statements. One of the most common is the IF statement. IF statements evaluate Boolean statements…greater than, less than, etc. Equal/Not equal is another evaluation statement. In JavaScript, there are two ways to work with equal/not equal. You can utilize two or three equal signs. Two equal signs evaluates value only. Three equal signs evaluates value and type.
For example…
Other than the aforementioned JavaScript specific aspects, the same control-flow statements exist in JavaScript as in C#...
Let's update our game of blackjack using control-flow statements...