So let's say "pizza" is some object in JS.
Is pizza.attributes a special property or something?
>>51525313
what kind of toppings?
>>51525950
v funny smartass
I mean is "attributes" a reserved property in Javascript if you know what I mean?
>>51527526
What makes you think any of us know?
All we do is circlejerk over watches, desktops and arch.
pizza.attributes is a variable or function or object or anything within pizza.
http://jsfiddle.net/9j9nvkbu/
Does this help?
>>51525313
>java script
>pizza
Counting down until: >"botnet wants me to starve."
pizza.topptributes is a new ES8 feature that provides promises for all non-free pizza distriutors for free pizza
>>51527675
Also I said attribute in the comments however the correct term is property.
>>51527699
you can also call Object.keys on any object to enumerate the properties
i.e.
Object.keys(pizza)\
>>51525313
do you mean like >>51527675
or do you mean something like:var pizza = {};
pizza.toppings = [
'pepporoni',
'cheese',
'sauce'
];
>>51527807
Yep. I've always been partial to doingfor (prop in object) {
object[prop](); // or anything else
}
myself.
>>51527831
To be fair, those are both the same. I add a property pizza.size that illustrates what OP is asking.
>>51525950
underrated comment
>>51527845
you're right. i suppose it depends on how many instances of the object you want.
>>51527879
Remove the immediate object creation and you can make as many unique pizzas as you want. Unless I misunderstand what you mean.
I had forgotten how to make empty objects honestly. I can't remember the last object I made without closure of some kind. Scope safety is very important to me.
>>51525313console.log(Object.prototype.pizza);
If this logs 'undefined' to console then it isn't.