/cute-calculator

Fully functional calculator buttons over a cute image of one. Built with an unreasonable amount of JavaScript.

Primary LanguageJavaScript

cute-calculator

My first personal project in JavaScript 🙂

Full calculator functionality built over a cute image of one.

  • Addition, subtraction, multiplication & division
  • Percent & square root
  • Decimals
  • and the other buttons too!
cute-calculator-video-short.mov

Built with JavaScript

...too much javascript.

Recently I happened upon this advice on reddit:

For anyone still struggling to get used to JavaScript, i suggest you guys try to hardcode the HTML entirely in JavaScript. Create your website with JavaScript, with document.createElement, and set the styles in JavaScript as well, and append it where you want it to go with document.append().

And I thought it sounded fun so I tried it out. It's definitely an absolute perversion of the separation of concerns. But it did bring me and the document object model closer, so it was worth it.

Authentic Display

Lights up with a weak green tint when you turn it on.
And uses a retro calculator font that's blurred just enough to look right.

Handles Division by Zero

At least as well as a cute calculator could, anyway.

Won't work until you turn it on

Just like a real calculator!