gpt4 book ai didi

javascript - 如何从 Chrome console.log() 输出中理解 JS 对象结构?

转载 作者:行者123 更新时间:2023-11-29 23:06:38 25 4
gpt4 key购买 nike

示例:

作为属性值,(...) 表示什么?

当属性有下拉标签与没有下拉标签时 - 这表明什么?

(以下代码片段使用了 mobx action 和 action.bound - 虽然这些不会影响手头的问题)

Implementation of Store class containing different function declarations

最佳答案

请使用 mobx toJs 函数登录控制台:

var obj = mobx.observable({
x: 1
});

var clone = mobx.toJS(obj);
console.log(clone);

further info.


  • 如果您使用 mobx-state-tree 而不是 toJS,请使用 getSnapShot

关于javascript - 如何从 Chrome console.log() 输出中理解 JS 对象结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54606294/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com