Skip to content

Instantly share code, notes, and snippets.

View desinas's full-sized avatar

Dimitrios Kalkasinas desinas

View GitHub Profile
@desinas
desinas / quizCheckBalance.js
Last active October 6, 2021 16:35
Checking Balance quiz (3-5) from Udacity - Front End Developer
/*
* 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
@desinas
desinas / quizIceCream.js
Last active March 15, 2023 12:04
Ice Cream quiz (3-6) from Udacity Front End Developer
/*
* 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"
@desinas
desinas / quizWhatDoIwear.js
Last active December 17, 2022 04:15
What do I wear Quiz (3-7) of Udacity Front end developer
/*
* 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
@desinas
desinas / quizNavigFoodChain.js
Last active January 20, 2024 08:09
Navigating the food chain Quiz from Udacity Front end developer
/*
* Programming Quiz - Navigating the Food Chain (3-8)
*
* Use a series of ternary operator to set the category to one of the following:
* - "herbivore" if an animal eats plants
* - "carnivore" if an animal eats animals
* - "omnivore" if an animal eats plants and animals
* - undefined if an animal doesn't eat plants or animals
*
* Notes
@desinas
desinas / quizBack2school.js
Last active September 19, 2023 12:45
Back to school Quiz (3-9) from Udacity Frond end developer
/*
* 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;
@desinas
desinas / quizFizzbuzz.js
Last active December 20, 2017 08:21
Julia James Quiz (4-1) from Udacity Frond end developer
/*
* 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
@desinas
desinas / quiz99bottlesOfJuice.js
Last active February 14, 2020 16:52
99 Bottles of juice Quiz of Udacity Front end developer
/*
* 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".
*/
@desinas
desinas / quizCountdLiftoff.js
Last active June 5, 2018 09:09
Countdown Liftoff quiz of Udacity Front end dev
/*
* 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) {
@desinas
desinas / quizFactorials.js
Last active December 20, 2017 08:35
Factorial ( ! ) Quiz for Udacity FEWD
/*
* 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
}
@desinas
desinas / quizFindMySeat.js
Last active December 16, 2017 18:34
Find my seat Quiz (4-8) of Udacity FEWD
/*
* 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