title: Building the logic behind what type of ___ are you quiz in JS
body: <p>I have a create a &quot;What type of ___ are you?&quot; type of quiz for by blog but not any specific one. I need to build a logic that would work on many quizzes which I can add directly from my admin panel.</p>
  <p>Each question will have only 2 options: yes or no.</p>
  <ol>
  <li><p>The most basic approach: If we have 'n' questions and 2 options each, it would have a total of (2)^n combinations and asking user to enter answer for each one of them won't be possible. So I put this one aside.</p>
  </li>
  <li><p>Points: We assign 1 point to each question for 'yes' and 0 to 'no'. We also assign a number to each of our possible answers list. At the end, whichever answer's number matches the total, we print it. But this leaves out a lot of combinations and will not be efficient.</p>
  </li>
  <li><p>Instead of numbers, we assign intervals to our answers. Like this: (answer1,0-3), (answer2,3-6). It would work better than 2nd but again, missing out many combinations.</p>
  </li>
  </ol>
  <p>What approach do these website quizzes use? Any help would be appreciated.</p>