File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ document.getElementById('start').addEventListener('click', function () {
31
31
32
32
// UI updates
33
33
// Create an array of span elements so we can set a class
34
- const spanWords = words . map ( function ( word ) { return `<span>${ word } </span>` } ) ;
34
+ const spanWords = words . map ( function ( word ) { return `<span>${ word } </span>` } ) ;
35
35
// Convert into string and set as innerHTML on quote display
36
36
quoteElement . innerHTML = spanWords . join ( '' ) ;
37
37
// Highlight the first word
@@ -83,3 +83,12 @@ typedValueElement.addEventListener('input', (e) => {
83
83
typedValueElement . className = 'error' ;
84
84
}
85
85
} ) ;
86
+
87
+ // Add this at the end of the file
88
+ const messages = {
89
+ success : "CONGRATULATIONS! You finished in {seconds} seconds." ,
90
+ error : "Oops! There's a mistake." ,
91
+ start : "Start typing to begin the game."
92
+ } ;
93
+
94
+ export default messages ;
You can’t perform that action at this time.
0 commit comments