popcorn 1

%%js 
// Function to check if a string is a palindrome
function palindrome(inputStr) {
    // Remove non-alphanumeric characters (including spaces, punctuation) and convert to lowercase
    const cleanStr = inputStr.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
    // Check if the cleaned string is equal to its reverse
    return cleanStr === cleanStr.split('').reverse().join('');
}

// Test cases
console.log(palindrome("did you know that sahas spelled backwards is sahas")); // Output: false
console.log(palindrome("hi")); // Output: false
console.log(palindrome("madam")); // Output: true
console.log(palindrome("A man, a plan, a canal, Panama")); // Output: true
console.log(palindrome("Was it a car or a cat I saw?")); // Output: true
console.log(palindrome("")); // Output: true (empty string is trivially a palindrome)
console.log(palindrome("No 'x' in Nixon")); // Output: true

popcorn 2

%%js

// Popcorn hack
// Open Devolper Tools
// Help --> Devolper Tools
// Change the variables so you get 4 Correct

let a = false; 
let b = true;
let c = false;
let d = true;

if (Boolean(a) == false) {
    console.log("A = Correct");
} else {
    console.log("A = InCorrect");
}

if (Boolean(b) != false) {
    console.log("B = Correct");
} else {
    console.log("B = Incorrect");
}

if (Boolean(c) != true) {
    console.log("C = Correct");
} else {
    console.log("C = Incorrect");
}

if (Boolean(d) == true) {
    console.log("D = Correct");
} else {
    console.log("D = incorrect");
}

if (Boolean(a) == false && )