A fun and interactive quiz platform to test and improve your knowledge of HTML, CSS, JavaScript, and more! π―
Featuring AJAX-loaded dynamic questions, SweetAlert2 notifications, and a real-time timer for a thrilling experience! β³π
β Multiple Categories β Practice HTML, CSS, JS and more π
β Dynamic Loading β Questions are loaded from JSON files β‘
β SweetAlert2 Feedback β Fun and colorful notifications π¨
β Real-time Timer β 15 seconds per question to keep you alert β³
β Responsive Design β Looks great on all devices π±π»
1οΈβ£ Open the platform and press "Start Test".
2οΈβ£ A question will appear dynamically with 4 answer choices.
3οΈβ£ Choose the correct answer before time runs out!
4οΈβ£ 3 mistakes = Game Over π±
5οΈβ£ Complete all questions to see your final score! π
π Questions are loaded from /src/json/test.json file.
Sample question structure:
{
  "quiz": "Which HTML tag is used for the largest heading?",
  "option-1": "<h1>",
  "option-2": "<h6>",
  "option-3": "<heading>",
  "option-4": "<head>"
}Main Game Card:
<div class="card quiz-card d-none" id="game-card">
    <h4 id="question-number" class="quiz-timer"></h4>
    <h2 id="quiz-container" class="mb-4">
        <span id="quiz-text">π</span>
    </h2>
    <p id="emoji" class="quiz-emoji">β</p>
    <div id="options" class="quiz-options"></div>
</div>Game Logic Snippet (JavaScript):
document.addEventListener("DOMContentLoaded", () => {
    const gameCard = document.getElementById("game-card");
    const quizContainer = document.getElementById("quiz-text");
    const questionNumber = document.getElementById("question-number");
    const optionsContainer = document.getElementById("options");
    let lessons = [];
    let currentIndex = 0;
    let mistakeCount = 0;
    let totalScore = 0;
    let isProcessing = false;
    let timer;
    let timeLeft = 15;
    async function loadLessons() {
        try {
            const response = await fetch('./src/json/test.json');
            lessons = await response.json();
            resetGame();
            gameCard.classList.remove("d-none");
            loadQuestion();
        } catch (error) {
            console.error("Error:", error);
        }
    }
    loadLessons();
    function loadQuestion() {
        if (currentIndex >= lessons.length) {
            showResult("π Excellent result!", `All questions completed! Total score: ${totalScore}`, "success", resetGame);
            return;
        }
        const currentLesson = lessons[currentIndex];
        // Load question and options dynamically...
    }
});/project-root
βββ /src/css/style.css        # Styling
βββ /src/json/test.json       # Questions list
βββ /src/images/banner.png    # Banner image
βββ index.html                # Main UI
βββ README.md                 # Documentation
1οΈβ£ Clone the repository:
git clone https://github.com/Iqbolshoh/javascript-test-platform.git2οΈβ£ Navigate to the project directory:
cd javascript-test-platform3οΈβ£ Open index.html in your browser and start playing! π
This project is open-source and available under the MIT License.
π― Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
π¬ I love meeting new people and discussing tech, business, and creative ideas. Letβs connect! You can reach me on these platforms:
