Advertisement
Onesible

Untitled

Mar 4th, 2025
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(...args) {
  2.     let count = 0
  3.  
  4.     for (let num of args) {
  5.         for (let char of num.toString()) {
  6.             if (char.includes('-')) {
  7.                 count++;
  8.             }
  9.         }
  10.     }
  11.     console.log(count % 2 == 0 ? 'Positive' : 'Negative')
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement