While Loops

<script>
// You start with 50 bitcoins
var bitcoins = 50;

// While bitcoins is more than 1 and less than 100
while (bitcoins > 0 && bitcoins < 100) {
    // Loop over and over, each time subtracting 1 bitcoin
    bitcoins = bitcoins - 1
}

// View the final number of bitcoins
console.log('Number of bitcoins:', bitcoins)
</script>