Nihongo Challenge N3 May 2026
// ヘルパー: 配列シャッフル (Fisher-Yates) function shuffleArray(arr) for (let i = arr.length - 1; i > 0; i--) const j = Math.floor(Math.random() * (i + 1)); [arr[i], arr[j]] = [arr[j], arr[i]]; return arr;
.score-box, .question-counter background: white; padding: 0.3rem 1rem; border-radius: 40px; box-shadow: inset 0 0 0 1px #ede3c8, 0 2px 4px rgba(0,0,0,0.02); nihongo challenge n3
.result-score font-size: 3rem; font-weight: 800; color: #b13e3e; margin: 1rem 0; arr[j]] = [arr[j]
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>NIHONGO CHALLENGE N3 | 日本語クイズ</title> <style> * margin: 0; padding: 0; box-sizing: border-box; user-select: none; /* better mobile tap feel, optional */ .question-counter background: white
// ------------------- App State ------------------- let currentQuestions = []; // 実際に使用する問題リスト (シャッフル済み) let currentIndex = 0; // 現在の問題番号 (0から) let userScore = 0; // 正解数 let answerLocked = false; // 回答済みで選択不可か let selectedOptionIndex = null; // 現在の問題で選んだ選択肢インデックス let currentQuestionObj = null;