Side note: the joke goes that Perl is a write only language as it is difficult to read it and understand it. Some twisted souls decided to create the obfuscated perl content: https://en.wikipedia.org/wiki/Obfuscated_Perl_Contest
For a list of some of the winners: https://www.foo.be/docs/tpj/issues/vol4_3/tpj0403-0017.html
But yes, even that shouldn't be encrypting strings.
e.g. original code:
function NewObject()
{
var mainApiUrl="https://google.com";
}
minified code:
function NewObject(){var mainApiUrl="https://google.com";}
obfuscated code:
var _0x8275=["\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D"];function ahyt56(){var _0xb40bx2=_0x8275[0]}
function a(){var b="https://google.com"}
That's why it's difficult to read minified code even if it's not obfuscated to the further extent that you sometimes see in attack payloads.
function a(){var b="https://google.com";}