-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
29 lines (24 loc) · 888 Bytes
/
app.js
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
// TODO(you): Modify the class in whatever ways necessary to implement
// the flashcard app behavior.
//
// You may need to do things such as:
// - Changing the constructor parameters
// - Changing the code in the constructor
// - Adding methods
// - Adding additional fields
class App {
constructor() {
const menuElement = document.querySelector('#menu');
this.menu = new MenuScreen(menuElement);
const mainElement = document.querySelector('#main');
this.flashcards = new FlashcardScreen(mainElement);
const resultElement = document.querySelector('#results');
this.results = new ResultsScreen(resultElement);
// Uncomment this pair of lines to see the "flashcard" screen:
// this.menu.hide();
// this.flashcards.show();
// Uncomment this pair of lines to see the "results" screen:
// this.menu.hide();
// this.results.show();
}
}