peterschussheim
10/13/2016 - 2:21 AM

join

join

///Produces a string that is the results of adding all elements of an array.
var names = ['Peter', 'Daniel', 'Schussheim'];
var fullName = names.join(' ');
var newLine = names.join('\n');

var name = 'peter schussheim';
var arr = name.split(' ').map(x => x.charAt(0).toUpperCase() + x.slice(1));

var str = arr.join(' ');

join

This Gist was automatically created by Carbide, a free online programming environment.

You can view a live, interactive version of this Gist here.