I can't find out why req.param('length') is returning 0

I'm using Sails.js (which is based on Express), and I'm sending a form input named length which has a value of '1000', like so:

<select name="length">
    <option value="1000">1000</option>
</select>

Server side, I have done some tests, and this is what I get

req.param('length');  // returns 0
req.params.length;    // returns 0
req.params.all()      // returns { length: '1000' }

I've also checked in the network tab of the developer's console, and I see the POST request being made, with a param of length = "1000".

Either I'm missing something very obvious or this is a weird glitch. Why is this happening and how can I get the value of length instead of getting "0"?

Thanks.

"length" is a word that you should avoid when accessing objects. So, you should not try to access "length" directly (ie. obj.length). You should probably change the underlying property name to something safe like quantity as mentioned by @jaumard:

<select name="quantity"></select>

Then you can access req.params.quantity.

Just rename your select by myLength, because length is a JavaScript keyword, which is confusing for sails.

EDIT :

sorry length is not a keyword, but in javascript values/objects (like strings, arrays) can have a property length set by default.

Thanks to Felix Kling for the correction