如何从另一个子程序更改变量

时间:2018-07-07 19:26:58

标签: python arrays list

我想用子例程(称为if (!updatedGame) { throw new NotFoundError("HTTP 404 Not Found: No Games Here"); } if (update.color && !validColor(update.color)) { throw new BadRequestError("HTTP 400 Bad Request: No Such Color"); } if (update.board !== undefined && moves(update.board, updatedGame.board) > 1) { throw new BadRequestError("HTTP 400 Bad Request: Only one move allowed. Wait your turn"); } console.log("Game has been updated"); return Game.merge(updatedGame, update).save(); )中的值在array中更改array2main()。我的代码:

change()

1 个答案:

答案 0 :(得分:1)

您必须将返回值分配给变量

[1, 2]
[3, 4]