Love Calculator
Find out the compatibility between two names!
Features Explained
Deterministic Result: By using ASCII summation (
charCodeAt), the tool ensures that "Romeo" and "Juliet" always get the same score. This adds a layer of "authenticity" to the fun.Number Animation: Rather than just showing a number, the score counts up from 0 to the result using
setInterval. This builds anticipation for the user.Responsive Design: The card width is controlled with
max-width, ensuring it looks great on a mobile phone (where it fills the screen) and a desktop (where it centers neatly).UX Polish: The "pulsing" heart icon and modern rounded corners create a friendly, "app-like" atmosphere.
How to use this tool:
Enter Names: Type two names into the input fields.
Calculate: Click the pink button to trigger the algorithm.
Review: The score will count up, and a custom message based on the percentage will appear.