diff --git a/content/en/tags-returns.md b/content/en/tags-returns.md
index 44d864b5..116d80d6 100644
--- a/content/en/tags-returns.md
+++ b/content/en/tags-returns.md
@@ -30,9 +30,9 @@ tag.
```js
/**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @returns {Number}
+ * @param {number} a
+ * @param {number} b
+ * @returns {number}
*/
function sum(a, b) {
return a + b;
@@ -45,9 +45,9 @@ function sum(a, b) {
```js
/**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @returns {Number} Sum of a and b
+ * @param {number} a
+ * @param {number} b
+ * @returns {number} Sum of a and b
*/
function sum(a, b) {
return a + b;
@@ -60,10 +60,10 @@ function sum(a, b) {
```js
/**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @param {Boolean} retArr If set to true, the function will return an array
- * @returns {(Number|Array)} Sum of a and b or an array that contains a, b and the sum of a and b.
+ * @param {number} a
+ * @param {number} b
+ * @param {boolean} retArr If set to true, the function will return an array
+ * @returns {(number|Array)} Sum of a and b or an array that contains a, b and the sum of a and b.
*/
function sum(a, b, retArr) {
if (retArr) {
@@ -73,3 +73,20 @@ function sum(a, b, retArr) {
}
```
{% endexample %}
+
+{% example "Returns a promise" %}
+
+```js
+/**
+ * Returns the sum of a and b
+ * @param {number} a
+ * @param {number} b
+ * @returns {PromiseSynonyms
@return
@returns [{type}] [description]
-
@returns [{type}] [description]
The @returns
tag documents the value that a function returns.
If you are documenting a generator function, use the @yields
tag instead of this tag.
@@ -55,34 +54,32 @@
/**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @returns {Number}
+ * @param {number} a
+ * @param {number} b
+ * @returns {number}
*/
function sum(a, b) {
return a + b;
}
-
- /**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @returns {Number} Sum of a and b
+ * @param {number} a
+ * @param {number} b
+ * @returns {number} Sum of a and b
*/
function sum(a, b) {
return a + b;
}
-
- /**
* Returns the sum of a and b
- * @param {Number} a
- * @param {Number} b
- * @param {Boolean} retArr If set to true, the function will return an array
- * @returns {(Number|Array)} Sum of a and b or an array that contains a, b and the sum of a and b.
+ * @param {number} a
+ * @param {number} b
+ * @param {boolean} retArr If set to true, the function will return an array
+ * @returns {(number|Array)} Sum of a and b or an array that contains a, b and the sum of a and b.
*/
function sum(a, b, retArr) {
if (retArr) {
@@ -90,8 +87,20 @@ Examples
}
return a + b;
}
-
- /**
+ * Returns the sum of a and b
+ * @param {number} a
+ * @param {number} b
+ * @returns {Promise} Promise object represents the sum of a and b
+ */
+function sumAsync(a, b) {
+ return new Promise(function(resolve, reject) {
+ resolve(a + b);
+ });
+}
+