Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wrongResult(numOne, numTwo, numThree) {
- let negativeCount = 0;
- let newArray = [numOne, numTwo, numThree];
- for (const element of newArray) {
- if (element < 0) {
- negativeCount++;
- }
- }
- if (negativeCount == 2 || newArray.includes(0)) {
- console.log("Positive");
- } else {
- console.log("Negative");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement