Is it possible to create a fixed length array in javascript?

后端 未结 9 1108
春和景丽
春和景丽 2020-12-03 00:59

Is it possible, in Javascript, to create an array whose length is guaranteed to remain the same?

For example, the array A is created with length 2. Subs

9条回答
  •  遥遥无期
    2020-12-03 01:44

    I know this is an old question but nowadays there's a node module that does just this called fixed-array

提交回复
热议问题