Yuicompressor error, not sure what is wrong?

Very confusing here, trying yuicompressor in a simple javascript file.

My js file looks like this:

function splitText(text)
{
    return text.split('-')[1];
}

Mistake:

[INFO] Using Cp1252 Encoding

[Error] 1: 20: illegal character [Error] 1: 20: syntax error [Error] 1: 40: illegal character [Error] 1: 49: missing; before the expression [Error] 1: 50: illegal character .. .. [Error] 7: 3: missing | in the compound statement [error] 1: 0: compilation caused 38 syntax errors ...

Can someone explain to me what is wrong?

+3
source share
1 answer
+4

Source: https://habr.com/ru/post/1711226/


All Articles