Changed around line 1
+ document.getElementById('decisionQuiz').addEventListener('submit', function(event) {
+ event.preventDefault();
+ const q1 = document.getElementById('q1').value;
+ const q2 = document.getElementById('q2').value;
+ const q3 = document.getElementById('q3').value;
+
+ const results = { master: 0, finance: 0, tech: 0 };
+ results[q1]++;
+ results[q2]++;
+ results[q3]++;
+
+ let recommendedPath = 'master';
+ if (results.finance > results[recommendedPath]) recommendedPath = 'finance';
+ if (results.tech > results[recommendedPath]) recommendedPath = 'tech';
+
+ document.getElementById('pathResult').textContent = `You should consider the ${recommendedPath.toUpperCase()} path.`;
+ document.getElementById('quiz').classList.add('hidden');
+ document.getElementById('result').classList.remove('hidden');
+ });
+
+ document.getElementById('retakeQuiz').addEventListener('click', function() {
+ document.getElementById('result').classList.add('hidden');
+ document.getElementById('quiz').classList.remove('hidden');
+ });