Alright, let’s dive into how I built a personality compatibility quiz!

So, the idea popped into my head a couple of weeks ago: a fun, interactive quiz that tells you how compatible you are with someone based on a few personality questions. Seemed like a cool weekend project, right? Famous last words!
First things first, I brainstormed the quiz questions. I wanted them to be thought-provoking but not too heavy. Think “What’s your ideal Friday night?” instead of “What’s your biggest fear?”. I ended up with about 10 questions, each with four multiple-choice answers. Wrote them all down in a simple text file to start.
Next up: the tech. I decided to keep it super simple. I used HTML for the structure, CSS for the styling (because nobody wants an ugly quiz), and JavaScript for the logic. No fancy frameworks or libraries this time. Wanted to keep it raw and learn as I went. I set up a basic HTML file with the question and answer fields.
Then came the fun part – the JavaScript. This is where I figured out how to handle the user’s selections and calculate the compatibility score. Each answer option was assigned a point value. Some answers were more “compatible” than others, and the points reflected that. When the user submitted the quiz, the script added up all the points and displayed a compatibility percentage.
I struggled a bit with the scoring algorithm. Initially, it was way too simplistic, giving everyone a compatibility score of either 0% or 100%. After some serious debugging and tweaking, I managed to get a more realistic range of scores. I added some logic to give slightly different results based on score ranges and put in some funny descriptions.

- 0-30%: Maybe you are better off as friends!
- 30-60%: You have some common ground, but a bit of work is needed.
- 60-80%: Good match, with great potential!
- 80-100%: Soulmates!
The CSS took up more time than I expected. I am not a designer by any means. I wanted a clean and modern look, so I spent hours fiddling with fonts, colors, and layouts. I ended up using a simple color palette and a responsive design so the quiz looks good on both desktop and mobile.
Testing, Testing!
Once the quiz was “done,” I asked some friends to test it out. They found a bunch of bugs and typos that I had missed. I fixed those and made some improvements based on their feedback. For example, they said the questions were a bit too long, so I shortened them.
After a few rounds of testing, the quiz was finally in a pretty good state. It’s not perfect, but it’s functional and kinda fun. I uploaded it to my personal website, and that was it.
Overall, it was a fun little project. I learned a lot about JavaScript and CSS, and I got to flex my creative muscles a bit. Would I do it again? Definitely! Maybe next time, I’ll add some fancy animations and a database to store the results!
If you’re thinking of building your own quiz, go for it! It’s a great way to learn and have some fun along the way.
