Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5502
}
56 changes: 31 additions & 25 deletions apps.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,61 @@

function childrenGuess () {
console.log('Do you want more children?');
}
let question1 = prompt('Do you want more children?');
let answer1 = 'yes';

if (question1 === 'yes') {
console.log('yes');
console.log('yes');
} else {
alert('sorry to hear');
console.log('wrong');
alert('sorry to hear');
console.log('wrong');
}




let question2 = prompt('Do you want to get married?');
let answer2 = 'yes';

if (question2 === 'yes') {
console.log('yes');
console.log('yes');
} else {
alert('sorry to hear!!');
console.log('wrong');
alert('sorry to hear!!');
console.log('wrong');
}


let question3 = prompt('Do you have a 5 year plan?');
let answer3 = 'yes';

if (question3 === 'yes') {
console.log('yes');
console.log('yes');
} else {
alert('start working on it!');
console.log('wrong');
alert('start working on it!');
console.log('wrong');
}

let question4 = prompt('Do you want a new car?');
let answer4 = 'yes';
let answer4 = 'yes';

if (question4 === 'yes') {
console.log('yes');
console.log('yes');
} else {
alert('AWWW, its OK!');
console.log('wrong');
alert('AWWW, its OK!');
console.log('wrong');
}

let question5 = prompt('Do you want to move states?');
let answer5 = 'yes';
let answer5 = 'yes';

if (question5 === 'yes') {
console.log('yes');
console.log('yes');
} else {
alert('stay where you are then');
console.log('wrong');
alert('stay where you are then');
console.log('wrong');
}


let question6 = prompt('What is your name?');
document.write('<p>Hello! '+ question6 + '</p>');

Expand All @@ -61,13 +65,15 @@ let userNumberGuess = prompt('Guess how old I am');
let correctNumber = 27;

if (userNumberGuess > correctNumber) {
alert('Not that old');
} else if (userNumberGuess < correctNumber) {
alert('Not that young');
} else {
alert('You are correct');
}
//need to finish
alert('Not that old');
} else if (userNumberGuess < correctNumber) {
alert('Not that young');
} else {
alert('You are correct');
}





//this is part 3
Expand Down