Categories
Medium Problems

โจทย์ข้อที่ mx0001

จงเขียนฟังก์ชั่นที่รับ string ที่เป็นประโยคเข้าไป แล้วส่งค่าจำนวนคำที่นับได้ออกมา


Examples

countWords(” just an example here move along”) ➞ 6

countwords(“this is a test”) ➞ 4

Leave a Reply