We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53514d9 commit ce5f6a7Copy full SHA for ce5f6a7
.gitignore
@@ -3,7 +3,7 @@ logs
3
*.log
4
node_modules
5
package-lock.json
6
-operations/tempCodeRunnerFile.js
+*operations/tempCodeRunnerFile.js
7
8
#
9
# Optional npm cache directory
operations/git_api/tempCodeRunnerFile.js
@@ -0,0 +1,18 @@
1
+const multiply = function() {
2
+
+ if(arguments.length < 2) return "Input at least two Number";
+ let total = 1;
+ for (let arg in arguments) {
+ let loop = typeof arguments[arg] === "number";
+ 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