Skip to content

Commit 92e13e0

Browse files
All test cases for two sum pass
1 parent 3f80598 commit 92e13e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

operations/arithmethics/operations.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//Addition Operation
22
const twoSum = function(a, b) {
3-
return typeof a === "number" && typeof b === "number"
3+
return arguments.length < 2 || arguments.length > 3
4+
? "Input only two Numbers"
5+
: typeof a === "number" && typeof b === "number"
46
? a + b
57
: "Inputs Must be Numbers";
68
};

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