JavaScriptda, siz JavaScript filter e includes funksiyasini ishlatishingiz mumkin. Quyidagi kod misoli: function intersection ((array1, array2) { return array1.filter ((function ((value) { return array2.includes ((value); }); } let array1 = [1, 2, 3, 4, 4, 5]; let array2 = [3, 4, 5, 6, 7]; let result = intersection ((array1, array2); log.console ((result); Ushbu misolda, intersection funksiyasi ikkita matritsalarni argument sifatida oladi va ikkala matritsalardagi qiymatlarni o'z ichiga olgan yangi matritsa beradi. filter funksiyasi array1 ning includes2da bo'lmagan qiymatlarini filtrlash uchun ishlatiladi. Funksiya berilgan qiymat matritsa ichida bor-yo'qligini tekshirish uchun ishlatiladi. Agar qiymat ikkala matritsa ichida bo'lsa, natijali matritsa qo'shiladi
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence