Using JavaScript's Array.flat() Method: A Comprehensive Guide