【发布时间】:2016-07-18 05:04:51
【问题描述】:
我只是想巩固(肯定知道)什么是 js 对象、方法和属性。到目前为止,这是我自己的观点,但我几乎没有任何疑问,这就是为什么我在这里了解并证明我需要的是真实的。
var property= "is this a property?";
function method(){"is this a method?"};
var ObjectLiteral = {property:"this should be a property of this ObjectLiteral I guess", method:function(){"this should be a method of ObjectLiteral am I right?"}};
//Here is the cache:
var Cachie = {method : function SecondObject(){/*nothing in here just a regular function or object*/},objecto:function(){alert("is this a method or object of Cachie object if so methods and properties are functions and variables")}};
Cachie.objecto();//than what is objecto related to Cachie and what is objecto called related Cachie is it an object of Cachie by the way, or is just simply called an object and nothing else of Cachie whatsoever?
【问题讨论】:
标签: javascript object methods properties