CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2025-02-02
by dcstingray

Original Post

Original - Posted on 2016-10-09
by Danylo Gudz



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I would like to add to Rene Saarsoo's answer that worked for me.
To list each object attribute for a list of those objects in a function parameter the following worked for me and validated with eslint.
[https://jsdoc.app/tags-param#parameters-with-properties][1]
Use {Object[]} for the array
Use {string} employees[].name for each attribute of the object in the array
/** * Assign the project to a list of employees. * @param {Object[]} employees - The employees who are responsible for the project. * @param {string} employees[].name - The name of an employee. * @param {string} employees[].department - The employee's department. */ Project.prototype.assign = function(employees) { // ... };

[1]: https://jsdoc.app/tags-param#parameters-with-properties
[JSDoc @param documentation][1] <!-- language: lang-js -->
/** * Assign the project to a list of employees. * @param {Object[]} employees - The employees who are responsible for the project. * @param {string} employees[].name - The name of an employee. * @param {string} employees[].department - The employee's department. */ Project.prototype.assign = function(employees) { // ... }; /** [1]: https://jsdoc.app/tags-param

        
Present in both answers; Present only in the new answer; Present only in the old answer;