Blog/static/Blog/JS/scripts.js
// CHECK IF STRING CONTAINS TEXT FROM ARRAY
CHECK IF STRING CONTAINS TEXT FROM ARRAY
CHECK IF STRING CONTAINS TEXT FROM ARRAY
function containsAny(text, array) {
	var matches = 0;
	for (substring in array) {
		if (text.includes(array[substring])) {
			matches++;
		}
	}
	return matches;
}
function containsAny ( text , array ) { var matches = 0 ; for ( substring in array ) { if ( text . includes ( array [ substring ] ) ) { matches ++ ; } } return matches ; }
CHECK IF STRING CONTAINS TEXT FROM ARRAY
CHECK IF STRING CONTAINS TEXT FROM ARRAY