Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7818679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:39:35+00:00 2026-06-02T06:39:35+00:00

I’ve been writing JS for a while, and I have been trying to debug

  • 0

I’ve been writing JS for a while, and I have been trying to debug the jQuery jCarousel plugin for IE7 compatibility. A lot of the variables are obfuscated, which is OK, but I have never seen syntax like this:

scroll: function (a, c) {
    !this.locked && !this.animating && (this.pauseAuto(), this.animate(this.pos(a), c))
}

It seems like some sort of shorthand notation, but I’ve never come across anything like this.
Similarly,

for (var a = function (a) {
    i.get(a).each(function () {
        h(i, this, a, b, c)
    })
}, k = d; k <= f; k++)  {
    k !== null && !(k >= j && k <= e) && a(k)
}

I have never seen a function being assigned as the iterator, and again the block statement inside looks like the first example. I know we all strive to save a few bytes when we write our code, but to me this feverish attempt comes at a cost of utter confusion and bewilderment to other programmers. Can anybody can give me a simple, “longhand” alternative / thorough explanation of what’s happening? I always want to know more about this language and how it works, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:39:36+00:00Added an answer on June 2, 2026 at 6:39 am

    The && operator evaluates each expression until it finds one which is truthy, which it returns. If none are truthy, it returns the last one.

    The , operator evaluates both it’s operands and returns the second one (no matter what they return).

    So in the first example, it’s basically saying:

    scroll: function (a, c) {
        if (!this.locked && !this.animating) {
            this.pauseAuto();
            this.animate(this.pos(a), c)
        }
    }
    

    As for the second example, it’s important to note the iteration is over the k variable, not a:

    var a = function (a) {
        i.get(a).each(function () {
            h(i, this, a, b, c)
        })
    };
    
    for (k = d; k <= f; k++)  {
        if (k !== null && !(k >= j && k <= e)) {
            a(k)
        }
    }
    

    For the second example, don’t forget it’s possible to define multiple variables in one var statement using the ,:

    var a = 1,
        b = 2,
        c = 3;
    

    It’s important to know that the developer himself isn’t minimizing the code like this; he’s writing normal source code with meaningful variable names in easy to read blocks. When it comes to release time, he’ll run the minified version through a minifier (UglifyJS, Closure Compiler etc) to get the reduced code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.