I’ve got an onclick event that sets a variable. I then want to parse this variable to a function.
The function is defined like so:
function priceset(obj, options)
My question is how do I parse a variable (The variable is called productprice) to the function and then use it within the function?
If you had a function like this:
Then, to call this function and pass some variables, you do this:
If your number is actually a string and you want to change it into a number, you can do that like this:
The
+in front of the string, will attempt to parse the string into a number.