-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathb.js
63 lines (59 loc) · 1.12 KB
/
b.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* multiplies by 10
*
* @param {number} a a number
* @returns {number} x10
* @example test(20) = 200
*/
export function times10(a) {
return a * 10;
}
/**
* simply returns a, which takes a default value of 100
*
* @export defaultValue
* @param {number} [a=100]
* @returns {number} simple return of a
*/
export function defaultValue(a = 100) {
return a;
}
/**
*
* constructs a Polygon
*
* @class Polygon
*/
export class Polygon {
/**
* Creates an instance of Polygon.
* @param {Number} height - height of Polygon
* @param {Number} width - width of Polygon
* @memberof Polygon
*/
constructor(height, width) {
this.name = "Polygon";
this.height = height;
this.width = width;
}
/**
* console.logs greeting
*
* @param {string} text - part of greeting
* @memberof Polygon
*/
sayName(text) {
console.log("Hi, I am a ", this.name + ".");
}
/**
* console.logs more info
* @description lorem ipsum ....
*
* @memberof Polygon
*/
sayHistory() {
console.log(
'"Polygon" is derived from the Greek polus (many) ' + "and gonia (angle)."
);
}
}