赋值输出不变?

小程序 文章 2022-01-21 15:00 303 0 全屏看文

AI助手支持GPT4.0

赋值输出不变?Assignment output unchanged?

赋值输出不变?

从服务端获取到的数据赋值给变量,但是输出还是赋值之前的值,什么原因呢?

这是定义的变量,

服务器获取到的数组赋值给变量,值为1,

打印变量还是0,这是什么原因呢?

The data obtained from the server is assigned to the variable, but the output is still the value before the assignment. Why? This is a defined variable. The array obtained by the server is assigned to the variable. The value is 1. Print the variable or 0. What is the reason?

回答:

brave:

截全点?没人要盗你的代码

【盲猜异步打印】

小黎:

wx.setData({

xxx:xxx

},()={ console.log(xxx)})

提笔忘情:

为什么不可以微信微信扫码登录游戏。

-EOF-

AI助手支持GPT4.0