JSFiddle - React, Tailwind, and code Playground
HTML
<script type = "javascript">
var totalCount = 200;
var years = 1;
function moveYear () {
var i = 1;
for (i > totalCount, i++) {
var children = Math.random(4);
totalCount = (totalCount + children);
}
var foodAbundancy = Math.floor(Math.random(35) - 15);
var deaths = Math.random(foodAbundancy);
totalCount = (totalCount - deaths);
years = years++
console.log("Years:" + years + "Total Population:" + totalCount);
}
</script>
JavaScript
var totalCount = 200;
var years = 1;
function moveYear () {
var i = 1;
for (i > totalCount, i++) {
var children = Math.random(4);
totalCount = (totalCount + children);
}
var foodAbundancy = Math.floor(Math.random(35) - 15);
var deaths = Math.random(foodAbundancy);
totalCount = (totalCount - deaths);
years = years++
console.log("Years:" + years + "Total Population:" + totalCount);
}
moveYear()