Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript join

// join an array together into a string

// array for the .join() method
let numbers = [3, 1, 6]

let string = numbers.join(', ') // returns '3, 1, 6'

// Also works the same just for an array of STRINGS
 
PREVIOUS NEXT
Tagged: #javascript #join
ADD COMMENT
Topic
Name
6+7 =