This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz - Checking Your Balance (3-5) | |
| */ | |
| // change the values of `balance`, `checkBalance`, and `isActive` to test your code | |
| var balance = 325.00; | |
| var checkBalance = true; | |
| var isActive = false; | |
| // your code goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Ice Cream (3-6) | |
| * | |
| * Write a single if statement that logs out the message: | |
| * | |
| * "I'd like two scoops of __________ ice cream in a __________ with __________." | |
| * | |
| * ...only if: | |
| * - flavor is "vanilla" or "chocolate" | |
| * - vessel is "cone" or "bowl" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: What do I Wear? (3-7) | |
| */ | |
| // change the values of `shirtWidth`, `shirtLength`, and `shirtSleeve` to test your code | |
| var shirtWidth = 23; | |
| var shirtLength = 30; | |
| var shirtSleeve = 8.71; | |
| // your code goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Back to School (3-9) | |
| */ | |
| // change the value of `education` to test your code | |
| var education = "no high school diploma"; | |
| // set the value of this based on a person's education | |
| var salary; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: JuliaJames (4-1) | |
| */ | |
| //version using an extra string for concatecate the result | |
| var x = 1; | |
| while (x < 21) { | |
| fizzbuzz = ""; //string init in every loop cycle | |
| if (x%3 === 0) fizzbuzz += "Julia"; //concat Julia if x mod 3 equals 0 | |
| if (x%5 === 0) fizzbuzz += "James"; //concat James if x mod 5 equals 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: 99 Bottles of Juice (4-2) | |
| * | |
| * Use the following `while` loop to write out the song "99 bottles of juice". | |
| * Log the your lyrics to the console. | |
| * | |
| * Note | |
| * - Each line of the lyrics needs to be logged to the same line. | |
| * - The pluralization of the word "bottle" changes from "2 bottles" to "1 bottle" to "0 bottles". | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Countdown, Liftoff! (4-3) | |
| * | |
| * Using a while loop, print out the countdown output above. | |
| */ | |
| // your code goes here | |
| timeInSeconds =60; | |
| while (timeInSeconds >= 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Factorials (4-7) | |
| */ | |
| var solution= 1; | |
| for (var num= 4; num > 1; num--) { | |
| //console.log(num + " x " + (num-1) + " = "); //verifying correct multilpication | |
| solution = solution * num; | |
| //console.log(solution + " + "); //verifying result | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Find my Seat (4-8) | |
| * | |
| * Write a nested for loop to print out all of the different seat combinations in the theater. | |
| * The first row-seat combination should be 0-0 | |
| * The last row-seat combination will be 25-99 | |
| * | |
| * Things to note: | |
| * - the row and seat numbers start at 0, not 1 | |
| * - the highest seat number is 99, not 100 |