简体   繁体   English

Javascript中对象的“状态”是什么意思?

[英]What is meant by an object's “state” in Javascript?

Here is the context in which it is being used: 这是使用它的上下文:

"If all of the state of an object is private, then the object is tamper-proof. Properties of the object can be replaced or deleted, but the integrity of the bject is not compromised." “如果对象的所有状态均为私有,则该对象是防篡改的。可以替换或删除对象的属性,但不会损害对象的完整性。”

This is from Crockford's Javascript: The Good Parts . 这来自Crockford的Javascript:The Good Parts

In software engineering, state is generally used to refer to all the values of all the properties/attributes of an object. 在软件工程中,状态通常用于指代对象所有属性/属性的所有值。 In javascript it has the same meaning. 在javascript中,它具有相同的含义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM