Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Count a value · ⁨นับจำนวนค่า⁩

English

Count a value

Count how often one value appears in a list.

Loop over the list and compare each item with target. It is the counter pattern again, with the condition item == target, and it works for words as well as numbers.

ไทย

นับจำนวนค่า

นับว่าค่าหนึ่งปรากฏในรายการบ่อยแค่ไหน

วนรอบรายการและเปรียบเทียบแต่ละไอเท็มกับ target. นี่คือรูปแบบตัวนับอีกครั้ง, dengan condition item == target, and it works for words as well as numbers (it works for words as well as numbers).

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP