How to describe object arguments in jsdoc? - Stack Overflow ** * @param {Object <string, number>} dict * The first type (string) documents the type of the keys which in JavaScript is always a string or at least will always be coerced to a string The second type (number) is the type of the value; this can be any type This syntax can be used for @returns as well Resources Useful information about documenting types can be found here: https: jsdoc
How to list the properties of a JavaScript object? 275 As slashnick pointed out, you can use the "for in" construct to iterate over an object for its attribute names However you'll be iterating over all attribute names in the object's prototype chain If you want to iterate only over the object's own attributes, you can make use of the Object#hasOwnProperty () method Thus having the following