Closed Aegyo closed 7 years ago
The way you are handling the default parameter for value and valueType will assign your default value for any falsey parameter passed to it, so it is overwriting 0 when adding the fossils.
http://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function
Ah, they have a value of 0 but because I OR with 1, it is still assigned 1?
Yes, that is what is happening for the fossils.
Nice one :)
The way you are handling the default parameter for value and valueType will assign your default value for any falsey parameter passed to it, so it is overwriting 0 when adding the fossils.
http://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function