So, this was quite an interesting problem I have been running into.
I am currently building a backbone.js - Rails app. Generally just building this for learning purp
It is telling you that a value is being assigned to a variable called csrf_token
that has not been declared, e.g.
csrf_token = 'foo';
In non–strict mode, that will create a property of the global object (usually called a global variable) called csrf_token
when that line of code is executed.
In strict mode, it will throw the error you see because strict mode prevents the implicit creation of global variables. You could also fix it by including:
var csrf_token;
anywhere in a global context in the same script element as the code the error comes from, or a previous script element.