Given a number input:
<input type="number" id="create-y-small" name="create-y-small" value="0">
How do I get the value of the input as a number? The following returns a string:
$("#create-y-small").val()
Why is this the default behavior? Surely one should expect a number type input to give a number?
I've looked for answers elsewhere but no luck:
Input value is a string instead of a number - Answers use parsing to parse to a number. I don't want to parse to a number I just want to get the number as a number.
Get variable value from input number - OP seemed happy to get the value as a string
Get the value of a input number in jQuery - Same story
https://www.codegrepper.com/code-examples/javascript/how+to+get+the+value+of+input+number+using+jquery - Same story