screenshot from NodeJS’s REPL. Increasing the array length adds empty items to the array (not undefined or null, and not an empty string, but an empty item, which you may know also occurs with [,,,,,]) and setting a negative value throws an error.
https://pool.jortage.com/socialbestieshouse/media_attachments/files/112/900/778/860/631/488/original/2b0ab7a61ee1e326.jpeg