`
zhangyaochun
  • 浏览: 2565693 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

underscore的Collections之contains

阅读更多

 

   contains

 

//Returns true if the value is present in the list. Uses indexOf internally, if list is an Array.
_.contains(list,value)

 

   举例:

 

//true
_.contains([1,2,3,4],4);

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics