a.split() vs Split(a)

Edit on GitHub

Setup

function Split(str) {
	result = [];
	for (var x = 0; x < str.length; x++) {
		result[x] = str.charAt(x);
	}
	return result;
}

Tests

  • a.split()

    var a = "abcdefghijklmnopqrstuvwxyz".split();
  • Split(a)

    var b = Split("abcdefghijklmnopqrstuvwxyz");