Horje
jsdoc object destructuring Code Example
jsdoc object destructuring
/**
 * My cool function.
 *
 * @param {Object} obj - An object.
 * @param {string} obj.prop1 - Property 1.
 * @param {string} obj.prop2 - Property 2.
 */
const fn = function ({prop1, prop2}) {
  // Do something with prop1 and prop2
}
object destructuring example
const hero = {
  name: 'Batman',
  realName: 'Bruce Wayne',
  address: {
    city: 'Gotham'
  }
};

// Object destructuring:
const { realName, address: { city } } = hero;
city; // => 'Gotham'




Javascript

Related
angular cli install Code Example angular cli install Code Example
get jsonp with fetch Code Example get jsonp with fetch Code Example
restart bot discord.js Code Example restart bot discord.js Code Example
Iterate with JavaScript Do...While Loops Code Example Iterate with JavaScript Do...While Loops Code Example
jquery table header agnostic of scroll Code Example jquery table header agnostic of scroll Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7