/branches/version1.x/examples/data/parameters2.js

http://jsdoc-toolkit.googlecode.com/ · JavaScript · 11 lines · 4 code · 0 blank · 7 comment · 4 complexity · cbe40a3088b1d1c36d3ece23240bb13a MD5 · raw file

  1. /**
  2.  * Modify the details of the employee.
  3.  * @param {object} employee The employee.
  4.  * @param {object} newDetails
  5.  * @config {string} [title] The new job title.
  6.  * @config {number} salary The new salary.
  7.  */
  8. function modify(employee, newDetails) {
  9.     if (newDetails.title != undefined)  employee.title = newDetails.title;
  10.     if (newDetails.salary != undefined) employee.salary = newDetails.salary;
  11. }