Azienda coinvolta
In Coding Round, they asked about palindrome code
Anonimo
function isPalindrome(str) { for (let i = 0; i < str.length / 2; i++) { if (str[i] !== str[str.length - 1 - i]) { return false; // If characters don't match, it's not a palindrome } } return true; // If all characters match, it's a palindrome } console.log(isPalindrome("racecar")); // Output: true console.log(isPalindrome("hello")); // Output: false