Dinero will take care of the money
I got a library for you, also a really nice course of establishing mental models, and a gentle introduction to web components for you. Happy weekend!
Library: Dinero.js
Dinero.js lets you express monetary values in JavaScript. You can perform mutations, conversions, comparisons, format them extensively, and overall make money manipulation in your application easier and safer.
Course: Just JavaScript
Just JavaScript is Dan Abramov’s distilled mental model of how JavaScript works and a collaboration with Maggie Appleton. It’s a great course for anyone who’s looking to strengthen their foundations of JavaScript. Highly recommended
Article: Intro to Web Components: Vanilla JS
This article goes through what web components are, how we can build them without a framework, and some limitations to keep in mind during development. It is a nice, gentle introduction for anyone looking to get started.