This file contains 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
//Melkaneas facebook-like quote rating app v2 | |
//after watching the solution video | |
//not using whatever cus whatever is whatever | |
//quotes to be rated | |
var favQuotes = [ | |
"WAR! War never changes!", | |
"BattleCruiser Operational!", | |
"Wubba Lubba Dub Dub!", |
This file contains 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
//Melkaneas ultra simple facebook-like quote rating app | |
//less is more | |
//quotes to be rated | |
var favQuotes = ["WAR! War never changes!", | |
"BattleCruiser Operational!", | |
"Wubba Lubba Dub Dub!", | |
"Show me what you gooot!", | |
"Life meaning is 42!", | |
"Nobody was born on purpose!", |
This file contains 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
var question = prompt("Will you go out with me?") | |
while (question != "yes") { | |
question = prompt("Will you go out with me?"); | |
} |
This file contains 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
var x = 0; | |
var y =-2; | |
var z = 3; | |
if (x>y && x>z) | |
{ | |
if (y>z) | |
{ |
This file contains 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
var isAdmin = true; | |
var isStudent = false; | |
if (isAdmin === true && isStudent === false) { | |
alert("Welcome Admininstrator"); | |
} else if (isAdmin === false && isStudent === true) { | |
alert("Welcome student"); | |
} if (isAdmin === false && isStudent === false) { | |
alert("Who are you?"); |
This file contains 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
var nr1 = prompt("Write Nr1"); | |
var nr2 = prompt("Write Nr2"); | |
if (nr1 < nr2) { | |
alert(nr2); | |
} else if (nr1 > nr2 ){ | |
alert(nr1); | |
} |
This file contains 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
var number = 3; | |
var numberGuess = prompt("Guess the Number!"); | |
if (number < numberGuess) { | |
alert("number is smaller"); | |
var numberGuess = prompt("Guess the Number!"); | |
} else if (number > numberGuess) { | |
alert("Number is bigger"); | |
var numberGuess = prompt("Guess the Number!"); | |
} if (number == numberGuess) { | |
alert("Great, you guessed!"); |
This file contains 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
//guessNumberProgram A | |
var number = 3; | |
var numberGuess = prompt("Guess the Number!") | |
if (number == numberGuess) { | |
alert("Great, you guessed!"); | |
} else if (number != numberGuess) { | |
alert("Bummer, the correct number was 3"); | |
} |
This file contains 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
// JavaScript story | |
var story = "Once upon a time JavaScript was born."; | |
var storyStart = "false"; | |
var $twist = | |
"And a sudden twist in the story." + " " + "Bug is here"; | |
var debuggerMissing = true; | |
var ofStory = 20; |
This file contains 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
var answere = prompt("What is the meaning of Life?"," "); | |
document.write(answere); | |
// had to add ester egg | |
if (answere = 42) { | |
alert("Did you bring a towel!"); | |
} |