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 do I correctly clone a JavaScript object? [duplicate] I have an object x I'd like to copy it as object y, such that changes to y do not modify x I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties This isn't a problem, since I'm copying one of my own literal-constructed objects How do I correctly clone a JavaScript object?