DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • prototype
    • concat
    • forEach
    • indexOf
    • join
    • pop
    • push
    • replace
    • reverse
    • shift
    • slice
    • splice
    • unshift
  • static
    • can.List.Map
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • can.List
  • /
  • join
  • / On this page
    • join

      function

      Join a List's elements into a string.

      • source

      list.join(separator)

      join turns a List into a string by inserting separator between the string representations of all the elements of the List.

      Parameters

      1. separator {String}:

        the string to seperate elements with

      Returns

      {String}:

      the joined string

      var list = new can.List(['Alice', 'Bob', 'Eve']);
      list.join(', '); // 'Alice, Bob, Eve'
      
      var beatles = new can.List(['John', 'Paul', 'Ringo', 'George']);
      beatles.join('&'); // 'John&Paul&Ringo&George'
      

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.