[Rails 3.2.8 & ExecJS 1.4.0] Getting syntax errors, but how can I debug

For example, I have the following code:

 function f(p) { for(var i=0;i<1;i++) { p=unescape(p); } return p; } var c='something'; 

code> When I pass it in the firebug console, it returns undefined. That's good now

When I try to run it using ExecJS. ExecJS returns: ExecJS :: RuntimeError: SyntaxError: Unexpected var token

I can’t figure out where to start looking for a problem. Does anyone have an idea?

+6
source share

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


All Articles