Skip to content

通过数字生成升序数组

javascript
// Output => [0, 1, 2]
const arr = [...Array(3).keys()];
评论
  • 按正序
  • 按倒序
  • 按热度
来发评论吧~
Powered by Waline v3.5.6

Views 1970 , Visitors 1253
Released under the MIT License.