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

  • Home
  • SEARCH
  • 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 8803143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:15:55+00:00 2026-06-14T01:15:55+00:00

I am reading this very interesting article about knockoutJs ( http://wildermuth.com/2011/11/20/Using_MVVM_on_the_Web_with_KnockoutJS ) And I

  • 0

I am reading this very interesting article about knockoutJs ( http://wildermuth.com/2011/11/20/Using_MVVM_on_the_Web_with_KnockoutJS )

And I came across this jquery call:

        $.each(response.results, function (x, game) {
          theViewModel.games.push(new gameModel()
          .id(game.Id)
          .name(game.Name)
          .releaseDate(game.ReleaseDate)
          .price(game.Price)
          .imageUrl(game.ImageUrl)
          .genre(game.Genre));
        });

what I don’ t understand is the function (x, game), the x is the index isn’ t ?, how about the ‘game’ argument, where is it coming from ?

  • 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-14T01:15:56+00:00Added an answer on June 14, 2026 at 1:15 am

    The callback you supply to $.each will be called once for eaach result in response.results. When it calls the callback it will pas in the index and the result.

    For example, it does this (illustrative example)

    for (var i = 0; i < response.results.length; i++) {
        yourCallback(i, response.results[i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im reading this article: http://elegantcode.com/2011/04/06/taking-baby-steps-with-node-js-pumping-data-between-streams/ and having some slight troubles understanding streams. Quote: Suppose
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
After reading this article I don't have a clear answer: http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/ Will browsers interpret
I've been wondering about this for a while after reading through an interesting article
I've been reading this http://msdn.microsoft.com/en-us/magazine/cc163681.aspx and found the part about defining abstract base classes
I was reading this very interesting article for implementing async style loading of js
This is a very interesting wiki article about programs that print their own source
After reading an interesting article about unit testing behavior instead of state, I came
After reading this article on thedailywtf.com, I'm not sure that I really got the
In college last year I came across something I found very interesting with regard

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.