Write capitalizeWords(str) that uppercases the first letter of every space-separated word and lowercases the rest. Collapse is not required — assume words are separated by single spaces.
Signature: capitalizeWords(str) => string
Example: "hello WORLD" → "Hello World".
Split on spaces, transform each word, join back with spaces.
For a word: uppercase index 0, lowercase the slice from index 1.
Test natijalarini ko'rish uchun kodingizni ishga tushiring.