Kamuela: forEach doesn’t.

Harnly: Convert it to an array how?

Harnly: I don’t see how that is represented in an array

Harnly: Seems like XY problem to me

Cone: An empty array perhaps

Mantia: What’s the most efficient way to trim keys from it?

Harnly: What is the output you expect?

Cone: You mean removing certain properties out of the object?

Gerrero: MatixYo: The XY problem: You want to do X, but don’t know how. You think you can solve it using Y, but don’t know how to do that either. You ask about Y, which is a strange thing to want to do. Just ask about X.

Mielcarek: Is it bad to acquire a canvas drawing context every time one of my drawing methods is called? Should I be holding on to a reference?

Teare: Harnly: http://jsfiddle.net/sx0kmg3u/2/

Donkle: MatixYo: why do you want an array like that?

Harnly: Zalatovo, always cache, canvas, elements, long paths, etc, it helps readability and performance

Baptista: MatixYo: objects are unordered key/value pairs. Arrays are sequential collections of values. They’re fundamentally different

Derkas: Hameen: read my previous message.

Stuedemann: I want to use forEach on it

Cone: Why not an object with ‘a’, ‘b’, ‘c’, ‘d’ instead?

Harnly: Czerwinski, then do Object.keys the .map

Lou: MatixYo: your previous message doesn’t have “what” you plan to achieve, it has “how I think I can solve the problem I’m not telling you”

Reid: Hameen: “I want to convert object into array so I can use .forEach on it, but it doesn’t work.” this was my first message.

Sermeno: We can’t really help you because we don’t know what problem you’re trying to solve. We can answer your question, but it’s unlikely that it’ll help you solve the problem

Rusich: Hameen: I wrote it clearly, I’d like to create array from object, what is your problem?

Briones: MatixYo: why do you want to use “.forEach” on it? What should be the ordering in the array since objects don’t have any?

Nothacker: Hameen: order will be the same as in objecy.

Fessenden: MatixYo: objects don’t have an order. They’re *unordered* collections

Wagenknecht: And the order you wrote them in?

Maheras: MatixYo: it’s just a detail of how you write the source code, it doesn’t matter to what’s running that source code.

Raelson: The only use for an object is to map a key to a value. Keys don’t have an intrinsic ordering

Shorkey: Hameen: if you do for.in on object then it will execute in the same order you wrote them.

Harnly: MatixYo, not necessarily no

Harnly: That depends on the implementation

Voegele: MatixYo: it *might* in some engines, but the spec says it’s unordered

Harnly: In other words, you cannot depend on the order

Rochefort: Harnly: so it can even be execute randomly or how otherwise?

Harnly: If you want order, you’d use an array. If you want the keys in a particular order, get the Object.keys, and sort them

Motsinger: In any case, if the only thing you want is “use forEach” in an object, you should just write a “forEach” that works on objects. It doesn’t make sense to apply Array.prototype.forEach to objects.

Wigand: Function eacho, f{ Object.keyso.forEachfunctionk{ fk, ok } }; each{a: 1, b: 2, c: 3}, functionk, v{ printk, v }

Gerrero: Hameen: undefined; Console: ‘a’, 1, ‘b’, 2, ‘c’, 3

Clarkin: But “is forEach even the right thing here?” isn’t something we can answer because you haven’t provided any context for your question

Marentez: As a rule of thumb, “forEach” is one of the most useless methods in JS

Safran: Http://skyinvestigations.com/intake.html — The reporting validate for the fields I need it directly under the field not sure how to fix this i searched in validate code cant find anything

Osako: Kamuela: forEach doesn’t return any value, it can only do side-effects. So you can’t compose, and you can’t abstract over it, without more side-effects which interact poorly with each other, because then you need to consider time, etc. Most of the time you want .map, .reduce, .filter, or something built on top of those