src/array.js
function intersection( arr1, arr2 ){
	var rtn = [];

	if ( arr1.length > arr2.length ){
		let t = arr1;

		arr1 = arr2;
		arr2 = t;
	}

	for( let i = 0, c = arr1.length; i < c; i++ ){
		let d = arr1[i];

		if ( arr2.indexOf(d) !== -1 ){
			rtn.push( d );
		}
	}

	return rtn;
}
function intersection( arr1, arr2 ){
	var rtn = [];

	if ( arr1.length > arr2.length ){
		let t = arr1;

		arr1 = arr2;
		arr2 = t;
	}

	for( let i = 0, c = arr1.length; i < c; i++ ){
		let d = arr1[i];

		if ( arr2.indexOf(d) !== -1 ){
			rtn.push( d );
		}
	}

	return rtn;
}
function intersection ( arr1 , arr2 ) { var rtn = [ ] ; if ( arr1 . length > arr2 . length ) { let t = arr1 ; arr1 = arr2 ; arr2 = t ; } for ( let i = 0 , c = arr1 . length ; i < c ; i ++ ) { let d = arr1 [ i ] ; if ( arr2 . indexOf ( d ) !== - 1 ) { rtn . push ( d ) ; } } return rtn ; }
I could probably make this sexier, like allow uniqueness algorithm, but I'm keeping it simple for now
I could probably make this sexier like allow uniqueness algorithm but I m keeping it simple for now