### Summary Introduce a `truncateWords()` function to truncate a string after a certain number of words instead of characters. ### Example ```js truncateWords("JavaScript is an amazing language", 3); // Output: "JavaScript is an..."
Summary
Introduce a
truncateWords()function to truncate a string after a certain number of words instead of characters.Example