-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.html
128 lines (99 loc) · 3.08 KB
/
index.js.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: index.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: index.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>const { add, subtract, divide, multiply } = require('./calculator');
/**
* @file index.js is the root file for this example app
* @author James Kulu
* @see <a href="https://jameskulu.com">James Kulu</a>
*/
/**
* Student Name
* @type {string}
*/
const studentName = 'James';
/**
* Array of grades
* @type {Array<number>}
*/
const grades = [98, 97.7, 76, 89];
/**
* Todo object
* @type {{id: number|string, text: string}}
*/
const todo = {
id: '1',
text: 'Hello'
};
/**
* Calculate tax
* @param {number} amount - Total amount
* @param {number} tax - Tax percentage
* @returns {string} - Total with a dollar sign
*/
const calculateTax = (amount, tax) => {
return `$${amount + tax * amount}`;
};
/**
* Class to create a person object
*/
class Person {
/**
*
* @param {Object} personInfo Information about the person
*/
constructor(personInfo) {
/**
* @property {string} name Persons name
*/
this.name = personInfo.name;
/**
* @property {string} age Persons age
*/
this.age = personInfo.age;
}
/**
* @property {Function} greet A greeting with the name and age
* @returns {void}
*/
greet() {
console.log(`Hello, my name is ${this.name} and I am ${this.age}`);
}
}
/**
* See {@link Person}
*/
const person1 = new Person({
name: 'John Doe',
age: 30
});
console.log(add(20, 30));</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Audio Bee</a></h2><h3>Classes</h3><ul><li><a href="Person.html">Person</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-calculator.html">Calculator</a></li><li><a href="tutorial-program.html">Program</a></li></ul><h3>Global</h3><ul><li><a href="global.html#add">add</a></li><li><a href="global.html#calculateTax">calculateTax</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#grades">grades</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#person1">person1</a></li><li><a href="global.html#studentName">studentName</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#todo">todo</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 09 2021 12:20:11 GMT+0545 (Nepal Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>