????????????const aStr = a.join('-');
????????????const bStr = b.join('-');
????????????// es5
????????????// if (aStr.indexOf(bStr) > -1) {
????????????//?????return true; // 相鄰
????????????// }
????????????// return??false; // 不相鄰
????????????// es6
????????????return aStr.includes(bStr);
????????}
????????const c1 = ['', 1, 2, 3, 4, 5], d1 = [3, 4];
??????????????c2 = ['', 1, 2, 3, '', 4, 5], d2 = [3, 4];
????????console.log(isAdjoin(c1, d1)); // true
????????console.log(isAdjoin(c2, d2)); // false
????????// 參考資料?https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/includes