From d784884307b2676f1858569bd398c27c6a139eb4 Mon Sep 17 00:00:00 2001 From: yashshinde8585 Date: Sun, 6 Jul 2025 09:55:13 +0530 Subject: [PATCH] fix: added export default messages in index.js --- 4-typing-game/solution/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/4-typing-game/solution/index.js b/4-typing-game/solution/index.js index 646c38a34e..91f5a0428f 100644 --- a/4-typing-game/solution/index.js +++ b/4-typing-game/solution/index.js @@ -31,7 +31,7 @@ document.getElementById('start').addEventListener('click', function () { // UI updates // Create an array of span elements so we can set a class - const spanWords = words.map(function(word) { return `${word} `}); + const spanWords = words.map(function (word) { return `${word} ` }); // Convert into string and set as innerHTML on quote display quoteElement.innerHTML = spanWords.join(''); // Highlight the first word @@ -83,3 +83,12 @@ typedValueElement.addEventListener('input', (e) => { typedValueElement.className = 'error'; } }); + +// Add this at the end of the file +const messages = { + success: "CONGRATULATIONS! You finished in {seconds} seconds.", + error: "Oops! There's a mistake.", + start: "Start typing to begin the game." +}; + +export default messages;