Question d’entretien chez Toast Inc

JavaScript function to reverse a string and check if it's a palindrome.