Skip to content

Instantly share code, notes, and snippets.

@lelouchB
Last active July 21, 2019 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lelouchB/509175cab39dd60726bfd789e36b5366 to your computer and use it in GitHub Desktop.
Save lelouchB/509175cab39dd60726bfd789e36b5366 to your computer and use it in GitHub Desktop.
const array1=[1,2,3,'My','Name','is','Ney']
const string1=array1.join()
const string2=array1.join('')
const string3=array1.join(',')
const string4=array1.join('and')
const string5=array1.join('-')
const string6=array1.join('=')
const string7=array1.join(':')
const string8=array1.join(' ')
console.log(array1)
// [ 1, 2, 3, 'My', 'Name', 'is', 'Ney' ]
console.log(string1)
// 1,2,3,My,Name,is,Ney
console.log(string2)
//123MyNameisNey
console.log(string3)
// 1,2,3,My,Name,is,Ney
console.log(string4)
// 1and2and3andMyandNameandisandNey
console.log(string5)
// 1-2-3-My-Name-is-Ney
console.log(string6)
// 1=2=3=My=Name=is=Ney
console.log(string7)
// 1:2:3:My:Name:is:Ney
console.log(string8)
// 1 2 3 My Name is Ney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment