简体   繁体   中英

How to select N last members in javascript array (functional style)

是否有一种优雅的内置(功能样式)方式来选择Javascript数组中的最后N成员?

就像这样简单:

list.slice( -N );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM