FREE LOGO

splitInTwo

splitInTwo

					var x = [1,2,3,4,5,6,7,8,9];
					var y = splitInTwo(x,5);
					// → y = [[1,2,3,4,5], [6,7,8,9]];

					console.log(splitInTwo([1,2,3,4,5,6,7,8,9],1));
					// → [[1],[2,3,4,5,6,7,8,9]]

					console.log(splitInTwo([1,2,3,4,5,6,7,8,9],5));
					// → [[1,2,3,4,5], [6,7,8,9]];

					console.log(splitInTwo(['Inna', 'Andreea', 'Candice', 'Beatrice', 'Lili'],15));
					// → [['Inna', 'Andreea', 'Candice', 'Beatrice', 'Lili'],[]]
				
Total page view 19695. Yesterday 158. Page visit today 158.