<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<input type="text" value="" oninput="change" />
<script>
let a = [1,2,3,4];
let b = [1,4,5,6,7,8];
let c = b.filter(item => !a.includes(item))
console.log('a', a) // [1,2,3,4]
console.log('b', b) // [1,4,5,6,7,8]
console.log('c', c) // [5,6,7,8];
</script>
</body>
</html>