ノックアウト Js に関するこの非常に興味深い記事を読んでいます ( http://wildermuth.com/2011/11/20/Using_MVVM_on_the_Web_with_KnockoutJS )
そして、私はこのjquery呼び出しに出くわしました:
$.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));
});
私が理解していないのは関数 (x, ゲーム) です。x はインデックスですよね?, 'game' 引数はどうですか? どこから来ているのですか?