-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcandidate-testing.js
More file actions
58 lines (41 loc) · 1.22 KB
/
candidate-testing.js
File metadata and controls
58 lines (41 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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;
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;
return grade;
}
function runProgram() {
askForName();
// TODO 1.1c: Ask for candidate's name //
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
};