How akshatkardak/quiz-application works
Project type and purpose
• This is a static, client-side web application: a simple quiz built with HTML, CSS and JavaScript.
• Purpose: present a series of questions (from questions.js), allow the user to select answers, track the score, and provide feedback.
File structure
• index.html: the single entry point, contains the markup and references to style.css, script.js and questions.js.
• style.css: all styling rules for layout and visual feedback.
• questions.js: a module or JSON-like structure that holds the quiz questions, choices and correct answers.
• script.js: contains the core application logic—event handlers, state management (current question index, score), DOM updates.
Extract insights from the README
• Describes features: “Start Quiz” button, answer selection, “Next” button, score display.
• No backend or external services—everything runs in the browser.
• Technology stack: HTML, CSS, JavaScript.
a. Main components to represent
• User (browser)
• UI layer (HTML + CSS)
• Quiz Logic module (script.js)
• Data Store (questions.js)
• Feedback & Score Display
b. Relationships and data flow
• User → interacts with UI (click Start/Next, select an answer)
• UI events → Quiz Logic
• Quiz Logic ↔ Data Store (fetch question, validate answer)
• Quiz Logic → UI (render question, update score, show feedback)
c. Architectural patterns & principles
• Separation of concerns: data (questions.js), presentation (index.html + style.css), logic (script.js).
• Event-driven flow: click events drive state transitions.
d. Technologies & frameworks
• Native browser APIs (DOM, events)
• No frameworks—plain JavaScript modules.