Skip to content

Commit ce5f6a7

Browse files
All files up-to-date
1 parent 53514d9 commit ce5f6a7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ logs
33
*.log
44
node_modules
55
package-lock.json
6-
operations/tempCodeRunnerFile.js
6+
*operations/tempCodeRunnerFile.js
77

88
#
99
# Optional npm cache directory
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const multiply = function() {
2+
3+
if(arguments.length < 2) return "Input at least two Number";
4+
5+
let total = 1;
6+
for (let arg in arguments) {
7+
let loop = typeof arguments[arg] === "number";
8+
9+
if (!loop) {
10+
throw new Error("Only Numbers are allowed");
11+
} else {
12+
total *= arguments[arg];
13+
}
14+
}
15+
return total;
16+
};
17+
18+
console.log(multiply());

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy