
- 0133技术站
- 联系QQ:18840023
  
- QQ交流群
 
- 微信公众号
 

描述: 提供一个如何使用描述项的例子。
提供一个如何使用描述项的例子。跟随此标签的文字将显示为高亮代码。
注意,一个doclet中可以同时使用多个@example标签。
例如,描述多个示例:
/**
 * Solves equations of the form a * x = b
 * @example
 * // returns 2
 * globalNS.method1(5, 10);
 * @example
 * // returns 3
 * globalNS.method(5, 15);
 * @returns {Number} Returns the value of x for the equation.
 */
globalNS.method1 = function (a, b) {
    return b / a;
};@example标签后面可以添加  标签作为示例的标题。
例如,带有标题的例子:
/**
 * Solves equations of the form a * x = b
 * @example <caption>Example usage of method1.</caption>
 * // returns 2
 * globalNS.method1(5, 10);
 * @returns {Number} Returns the value of x for the equation.
 */
globalNS.method1 = function (a, b) {
    return b / a;
};
推荐手册