What does this code refer too?
queryString: function() {
//some code
}
I tested it in the WebConsole (Firefox) but it wouldn’t execute, so I’m thinking that it isn’t equivalent to function queryString() {}.
So what is it exactly?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are missing some code there, but I assume its part of an object declaration like this:
It assigns a function as a property of an object literal. It would be equivalent to this:
In general, the object literal syntax looks like this:
So the reason this didn’t work in the console is that it was not enclosed in
{}characters, denoting an object literal. And this syntax is valid ONLY in an object literal.