How to fix the TypeError in Inject Js Script?

I need to extract the language from Chrome. I’m using the Inject Js Script activity with this script code "(function() { return navigator.language; })();", but I’m getting this error:
Inject Js Script 'Enter your': TypeError: r is not a function.

@nicol-dayana.arias-lebro,

Try this code

function() {
    return navigator.language;
}

It worked, thank you very much :clap:t4: