SyntaxError: Unexpected end of input Code Embed block

Look for this part in your code, the else isn’t closed.

        if (element) {
            const text = element.textContent;

            const c = getLastWord(text);

            console.log('Country:', country); 
        } else {
            console.log('Element not found');