JavaScript Function Questions (Moderate Level)
1. Write a function to check if a given string is a palindrome (same forwards and backwards).
2. Create a function that accepts an array and returns a new array with only the unique values.
3. Write a function that counts how many times a specific character appears in a string.
4. Write a function that accepts a number and returns the factorial of that number using recursion.
5. Create a function that finds the second highest number in an array.
6. Write a function that flattens a nested array (e.g., [1, [2, [3, 4]], 5] => [1, 2, 3, 4, 5]).
7. Create a function that accepts a date string and returns the day of the week.
8. Write a function that checks if two strings are anagrams of each other.
9. Create a function that capitalizes the first letter of each word in a sentence.
10. Write a function to reverse the words in a sentence but not the characters (e.g., 'Hello World' =>
'World Hello').