Guest User

Untitled

a guest
Nov 21st, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. //This is the first examples with the Join method
  2.  
  3. //Lets take the strings which is separates with comas and changed with '-'
  4. ['Rafael','Alejandro','@rgarduno'].join('-');
  5. // => Rafael-Alejandro-@rgarduno
  6.  
  7. //now let's changed as the way it was
  8. ['Rafael','Alejandro','@rgarduno'].join();
  9. // => Rafael,Alejandro,@rgarduno
  10.  
  11. //but what if I need all without spaces
  12. ['Rafael','Alejandro','@rgarduno'].join('');
  13. // => "RafaelAlejandro@rgarduno"
Add Comment
Please, Sign In to add comment