Jquery error: scripts.js:9 Uncaught SyntaxError: Unexpected token 'var'

my consol show me this error, there is the line about the error

u = !!window.jQuery, var = a(window), w = function (a, c) {
            b.ev.on(o + a + p, c)

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


There are in fact syntax errors in this code. The code looks kind of fishy – where did you get it from?

To answer your question: You appear to be declaring a variable with no name equal to a function called a returning something done on window.

var = a(window)

var is a keyword, and is used to declare a variable.

Hope this helps

Ah, I read the code snippet wrong and thought it was separating statements with commas. Just a badly named variable. Can’t see how a minifier would output anything like this though, so I’m still very suspicious about that function.