{ var x = 10; var y = 6; var z = 8; }//math variables { var penny = 1; var nickel = 5; var dime = 10; var quarter = 25; var total = 150; }//coin variables { var date = new Date(); var radius = date.getHours(); var circle = (Math.PI *2) * radius; var tCircle = circle.toFixed(3); }//date variables { var jack = 10; var queen = 10; var king = 10; var faceCard1 = [jack, queen, king]; var faceCard2 = [jack, queen, king]; var faceCard3 = [jack, queen, king]; var faceCard4 = [jack, queen, king]; var ace1 = [11]; var ace2 = [11]; var ace3 = [11]; var ace4 = [11]; var ten1 = [10]; var ten2 = [10]; var ten3 = [10]; var ten4 = [10]; var diamonds = [2,3,4,5,6,7,8,9]; var spades = [2,3,4,5,6,7,8,9]; var clubs = [2,3,4,5,6,7,8,9]; var hearts = [2,3,4,5,6,7,8,9]; var entireDeck = diamonds.concat(spades, clubs, hearts, ace1, ace2, ace3, ace4, faceCard1, faceCard2, faceCard3, faceCard4, ten1, ten2, ten3, ten4); var rand1 = entireDeck[Math.floor(Math.random() * 52)]; var rand2 = entireDeck[Math.floor(Math.random() * 52)]; var rand3 = entireDeck[Math.floor(Math.random() * 52)]; var randoms = rand1 + rand2; var hit = randoms + rand3; } { var num1 = Math.floor(Math.random() * 20) - 5; var num2 = Math.floor(Math.random() * 20) - 5; var array1 = []; }//prime time variables { var d = new Date(); var day = d.getDay(); var hour = d.getHours(); }//waiting for the weekend variables { var add = true; var pizzaPeople = []; var possibleToppings = []; var toppingsToOrder = ""; var totalSlices = 0; var totalPeople = ""; }//pizza variables */ /* previous variables */ /* window.alert("Hello World \n10 + 6 = " + (x+y) + "\n 8 - 6 = " + (z-y) + "\n 8 * 6 = " + (z*y) + "\n (8 * 6) / 10 = " + ((z*y)/x)); window.alert("Coin Counting \n$1.50 \n" + quarter + " + " + quarter + " + " + quarter + " + " + quarter + " + " + quarter + " + " + quarter + " = " + total + "\n" + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " = " + total + "\n" + quarter + " + " + quarter + " + " + quarter + " + " + quarter + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " + " + dime + " = " + total + "\n" + quarter + " + " + quarter + " + " + quarter + " + " + quarter + " + " + dime + " + " + dime + " + " + nickel + " + " + nickel + " + " + nickel + " + " + nickel + " + " + nickel + " + " + penny + " + " + penny + " + " + penny + " + " + penny + " + " + penny + " = " + total ); window.alert("Timely Measures \n" + date + "\n" + tCircle); if (randoms == 21) { window.alert ("Blackjack \ncard 1 = " + rand1 + " card 2 = " + rand2); console.log (rand1, rand2, randoms); } else if (randoms > 21) { window.alert ("Bust \ncard 1 = " + rand1 + " card 2 = " + rand2 + " total = " + randoms); console.log (rand1, rand2, randoms); } else if (randoms >= 17) { window.alert ("Stay \ncard 1 = " + rand1 + " card 2 = " + rand2 + " total = " + randoms); console.log (rand1, rand2, randoms); } else if (randoms < 17 && hit < 21 ) { window.alert ("Hit & stay \ncard 1 = " + rand1 + " card 2 = " + rand2 + " total = " + randoms + " hit = " + rand3 + " total = " + hit); console.log (rand1, rand2, randoms, rand3, hit); } else if (randoms < 17 && hit > 21 ) { window.alert ("Hit & bust \ncard 1 = " + rand1 + " card 2 = " + rand2 + " total = " + randoms + " hit = " + rand3 + " total = " + hit); console.log (rand1, rand2, randoms, rand3, hit); } else if (randoms < 17 && hit == 21 ) { window.alert ("Hit & blackjack \ncard 1 = " + rand1 + " card 2 = " + rand2 + " total = " + randoms + " hit = " + rand3 + " total = " + hit); console.log (rand1, rand2, randoms, rand3, hit); } function isPrime(value) { if (!Number.isInteger(value)) { return false; } for(var i = 2; i < value; i++) { if(value % i === 0) { return false; } } return value >1; } if (num2 < num1) { window.alert("End less than start"); console.log(num1 + " " + num2); } else if (num1 < 0 ) { window.alert("Start is negitive"); console.log(num1 + " " + num2); } else if (num2 < 0) { window.alert("End is negitive"); console.log(num1 + " " + num2); } else if (!Number.isInteger(num1)) { window.alert("Start is a decimal") console.log(num1 + " " + num2); } else if (!Number.isInteger(num2)) { window.alert("End is a decimal") console.log(num1 + " " + num2); } for (x=num1; x Noun
Noun
Number
Noun
Noun
Noun
Noun
Verb
Verb
Plural Noun
function dissappear() { var x = document.getElementById("story"); if (x.style.display === "block") { x.style.display = "none"; } else { x.style.display = "block"; } var y1 = document.getElementById("input1"); var z1 = document.getElementById("replace1"); z1.innerHTML = y1.value; var y2 = document.getElementById("input2"); var z2 = document.getElementById("replace2"); z2.innerHTML = y2.value; var y3 = document.getElementById("input3"); var z3 = document.getElementById("replace3"); z3.innerHTML = y3.value; var y4 = document.getElementById("input4"); var z4 = document.getElementById("replace4"); z4.innerHTML = y4.value; var y5 = document.getElementById("input5"); var z5 = document.getElementById("replace5"); z5.innerHTML = y5.value; var y6 = document.getElementById("input6"); var z6 = document.getElementById("replace6"); z6.innerHTML = y6.value; var y7 = document.getElementById("input7"); var z7 = document.getElementById("replace7"); z7.innerHTML = y7.value; var y8 = document.getElementById("input8"); var z8 = document.getElementById("replace8"); z8.innerHTML = y8.value; var y9 = document.getElementById("input9"); var z9= document.getElementById("replace9"); z9.innerHTML = y9.value; var y10 = document.getElementById("input10"); var z10 = document.getElementById("replace10"); z10.innerHTML = y10.value; } */ /* prevoius assignments */ /* #story { width: 100%; padding: 345px 0; text-align: center; } #inputStuff { width: 50%; padding: 100px 0; text-align: left; margin-right: 50%; } .hidden{ display:none; } .unhidden{ display:block; } function setDefault(){ var x = document.getElementById("body"); x.style.backgroundColor = "grey"; var y = document.querySelector("#dynamic"); y.classList.remove("coolblue"); y.classList.remove("hotred"); y.classList.add("default"); var z= document.getElementById("heading"); z.innerHTML = "This is the DEFAULT style"; var a = document.getElementById("dynamic"); a.innerHTML = "This layout has a div element at 100% width and the height is 200px. The text inside also has a top padding of 50px. The text is this div element is centered." } function setBlue(){ var x = document.getElementById("body"); x.style.backgroundColor = "#20ac7d"; var y = document.querySelector("#dynamic"); y.classList.add("coolblue"); y.classList.remove("hotred"); y.classList.remove("default"); var z= document.getElementById("heading"); z.innerHTML = "This is the COOL style"; var a = document.getElementById("dynamic"); a.innerHTML = "This layout has a div element at 80% width and the height is 150px. The text inside also has a top padding of 50px. The text in this div element is aligned to the right." } function setRed(){ var x = document.getElementById("body"); x.style.backgroundColor = "orange"; var y = document.querySelector("#dynamic"); y.classList.remove("coolblue"); y.classList.add("hotred"); y.classList.remove("default"); var z= document.getElementById("heading"); z.innerHTML = "This is the HOT style"; var a = document.getElementById("dynamic"); a.innerHTML = "This layout has a div element at 90% width and the height is 175px. The text inside also has a top padding of 50px. The text in this div element is aligned to the left." }
div
.default{ width: 100%; height: 200px; background-color:white; margin: auto; text-align: center; padding-top: 50px; } .coolblue{ width: 80%; height: 150px; background-color:#0086b3; margin: auto; text-align: right; padding-top: 50px; } .hotred{ width: 90%; height: 175px; background-color:red; margin: auto; text-align: left; padding-top: 50px; } #heading-div{ width: 100%; height: 50px; bottom-margin: 10px; } */ /* other */