[Soft Reject] I can not understand the reason


#1

Dear Friends! Could you help me and tell me what they mean to the red line


#2

Because you need to use an unique prefix for all functions, classes, variables, etc.:

Use a unique prefix for all function names, classes, hooks, public/global variables, and database entries to avoid conflict issues with plugins and other themes.


#3

This File Is js.We checked syntax of a code about that problem and there was nothing incorrect. Also we checked it with other debuggers and there was’s not any problem.
It finds easily closing tags in notepad++ and in online editors. So what causes that problem?
In fact, the code runs smoothly without errors.


#4

Ha, I thought you were talking about PHP code.

Anyway, if I’m correct that’s the first line of your JS file. You should write the JS code in strict mode. Check the Javascript requirements in the link above.

Or maybe it’s just a misunderstanding of the reviewer.


#5

File reject reason is the following problem: http://envato.d.pr/uYrU

We checked syntax of a code about that problem and there was nothing incorrect. Also we checked it with other debuggers and there was’s not any problem.
It finds easily closing tags in notepad++ and in online editors. So what causes that problem?
In fact, the code runs smoothly without errors.


#6

Hi,

Again, if that is the first line of your JS code (a class) it means that:

  1. You’re not avoiding variable collisions. You can use an IIFE (https://en.wikipedia.org/wiki/Immediately-invoked_function_expression)
  2. You’re not writing the JS code in strict mode.

As I said this is explained in the link above, “Javascript” section:

(function($) { "use strict"; // Author code here })(jQuery);