Help with an HTML JS project

Off topicProgramming → Help with an HTML JS project

I am making a sales tax calculator for myself because I was bored one day. Anyways I’m ha ing trouble multiplying variables. When it multiplies the two variables it results in NaN (not a number). Can anybody help me?

Here is the pastebin

EDIT: I put a src to the AngularJS api I took it out and it is still not working EDIT2: I have a bunch of left over angular js lol ignore it (It still doesn’t work without it)

Oh okay, I’ll look up how to convert a string to a variable

Lolno. The problem is an entirely different one. You should be very greateful for how lenient newer browsers are in terms of rendering pages with absolute garbage syntax, else you wouldn’t even get to see a page at all. Anyways here’s the problem:

When you first load the page, you create two variables. Let’s say they are like a piece of paper, for the sake of sinplicity. So, when the page gets loaded, you write literally nothing to both pieces, because that’s what’s in the inputs by default. JS gets initialized before input fields get populated. Now when you click the button, your method takes those pieces of paper you made at the beginning and calculates the result with those: “Nan * Nan = NaN”