-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4a5db0b
Showing
6 changed files
with
3,657 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
.vscode/ | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const input = require('readline-sync'); | ||
|
||
// TODO 2: modify your quiz app to ask 5 questions // | ||
|
||
// TODO 1.1a: Define candidateName // | ||
let candidateName; | ||
// TODO 1.2a: Define question, correctAnswer, and candidateAnswer // | ||
let question; | ||
let correctAnswer; | ||
let candidateAnswer; | ||
|
||
|
||
//TODO: Variable for Part 2 | ||
let questions; | ||
let correctAnswers; | ||
let candidateAnswers; | ||
|
||
|
||
function askForName() { | ||
// TODO 1.1b: Ask for candidate's name // | ||
|
||
} | ||
|
||
function askQuestion() { | ||
// TODO 1.2b: Ask candidate the question and assign the response as candidateAnswer // | ||
|
||
|
||
} | ||
|
||
function gradeQuiz(candidateAnswers) { | ||
|
||
// TODO 1.2c: Let the candidate know if they have answered the question correctly or incorrectly // | ||
|
||
|
||
|
||
let grade; //TODO 3.2a use this variable to calculate the candidates score. | ||
//TODO 3.2b calculate the candidate's percentage | ||
|
||
return grade; | ||
} | ||
|
||
function runProgram() { | ||
askForName(); | ||
// TODO 1.1c: Greet candidate using their name // | ||
console.log(); | ||
askQuestion(); | ||
gradeQuiz(this.candidateAnswers); | ||
} | ||
|
||
// Don't write any code below this line // | ||
// And don't change these or your program will not run as expected // | ||
module.exports = { | ||
candidateName: candidateName, | ||
question: question, | ||
correctAnswer: correctAnswer, | ||
candidateAnswer: candidateAnswer, | ||
questions: questions, | ||
correctAnswers: correctAnswers, | ||
candidateAnswers: candidateAnswers, | ||
gradeQuiz: gradeQuiz, | ||
runProgram: runProgram | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
console.log("Hello"); | ||
|
||
function functionName(){ | ||
//TODO: return "Hello, World!" | ||
let variableName = 12; | ||
variableName+=8; | ||
|
||
return variableName; | ||
} | ||
|
||
console.log(functionName()); |
Oops, something went wrong.