openlang

CoffeeScript equivalent for JavaScript object key iteration?

What is CoffeeScript's equivalent of for (var property in record)? The generated output is...

for (_j = 0, _count = record.length; _j < _count; _j++) {
  property = record[_j];

...yet I only need to iterete over an object's properties.

The conversation continues 2

Follow the reasoning
  1. Permalink

    use of:

    for property, entry of record

    or, if you want to examine only the object's own properties (excluding anything inherited through its prototype chain):

    for own property, entry of record

Other sides of the same question

  1. Choosing enum entries randomly with GDScript in Godot 3.3 without listing each one?

    Here's the enum declaration I'm using in GDScript: I'd like to choose an enum variant randomly without listing every possible…

    Replies 2Latest activity gdscript
  2. Nim remainder syntax

    How is modulus expressed in Nim? cell % 7 == 0 gives undeclared identifier: '%' Neither a Google search nor looking through S…

    Replies 2Latest activity nim
  3. Returning results from an APL function

    How do I make my function return something once execution has finished? For instance, I have: ROUTINE N ? N ⍴ 12 //That gener…

    Replies 2Latest activity apl