Js อาเรย์.รวมถึงการข้อความ

รหัสตัวอย่าง

2
0

js ตรวจสอบว่าข้อความเกี่ยวกัจากตารางคู่ลำดับ

wordsArray = ['hello', 'to', 'nice', 'day']
yourString = 'Hello. Today is a nice day'.toLowerCase()
result = wordsArray.every(w => yourString.includes(w))
console.log('result:', result)
0
0

ถ้าอาเรย์รวมถึงการข้อความ

function droids(arr) {
    result = "These are not the droids you're looking for." 
    
    for (str of arr) {
        if (str == 'Droids')
            result = "Found Droids!"
    }
    
    return result;
}

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่