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 8327059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:58:32+00:00 2026-06-09T00:58:32+00:00

Can someone please explain this piece of code which I have tried to decipher?

  • 0

Can someone please explain this piece of code which I have tried to decipher?
It still looks funny to me.

Because I need the Facebook login logic… and also because I like to understand what the code does… scope-wise etc…

Which function runs first, the outer one or the inner one?
Is this another way of writing plugin code?

var openid = {


 },doJsFacebookLogin: function (a) {
        window.FB.login(function (b) {
            b.authResponse && (b = "/users/oauth/facebook/js?accessToken=" + encodeURI(b.authResponse.accessToken),
            a && (b += "&returnUrl=" + encodeURI(a)), window.location = b)
        }, openid.facebook_login_params)
    },

Also what do the commas represent in the body off the function?

    facebookLogin: function (a, b, c) {
        c || ($("." + b).css("cursor", "wait"), openid.facebook_app_id ? openid.doJsFacebookLogin() : (this.setOAuthInfo(a.oauth_version, a.oauth_server), c || $("#openid_form").submit()))
    },
etc...
  • 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-09T00:58:35+00:00Added an answer on June 9, 2026 at 12:58 am

    which function runs first, the outer one or the inner one

    When the outer one is run, it calls the inner one.

    This is basically no different from, let’s say

    function foo() {
      alert("bar");
    }
    

    – you yourself would call foo() somewhere in your code, and that function then calls the alert method of the window object to bring up a little message saying “bar”.

    also what do the comma’s represent in the body off the function?

    This is just a way of not actually having single statements and separate them with a semicolon – but of using expressions instead, and just separating them with a comma. (Which itself is an operator in JavaScript, but it does nothing more then denote a sequence of expressions, it does not logically connect them in any way.)

    As long as a statement also makes for a valid expression, you can do that; although I can spot no actual benefit from doing it in this case – would be something different if the outcomes of the single expressions would be logically joined together by other logical operators as f.e. && or ||, and then the value of this whole expression would be used as a return value for that function, so that other functions/code parts calling it could determine success or failure of the function that way.

    If you’re not familiar with what actually constitutes an expression in JavaScript, look for example here http://lib.ru/JAVA/javascr/expr.html#expr (or into the JS book of your choice).

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

Sidebar

Related Questions

Can someone please explain what #ifdef..#else..#endif does in this piece of code? It's from
I have regex which reads: @<img\s*[^>]*>(?:\s*?</img>)? Can someone please explain this part: (?:\s*?)? What
Can someone please explain this to me? I have the following code: <form action=<?php
Can someone please explain this piece of code? struct Class { boost::function<void()> member; };
Can someone please explain this bit of piece of code? Thanks. alert({foo:test foo, bar:test
I have a feeling this XML is not valid, can someone please explain why?
Can some one please explain to me why this piece of code prints out
Can someone please explain why this JavaScript code outputs zero instead of one? Also,
Can someone please explain this phenomenon? I am using Mojarra 2.1.6 - Glassfish 3.1.2.
Can someone please explain to me how this responsive approach works? This was done

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.